Remove expect calls in callback functions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
548b70f951
commit
db0c2fe051
1 changed files with 5 additions and 7 deletions
|
@ -3,8 +3,8 @@ import { describe, test, expect, vi } from 'vitest';
|
||||||
import { findByText, fireEvent, render, screen } from '../../utils/test-utils';
|
import { findByText, fireEvent, render, screen } from '../../utils/test-utils';
|
||||||
import Sidebar from './Sidebar';
|
import Sidebar from './Sidebar';
|
||||||
|
|
||||||
describe.concurrent('Sidebar open', () => {
|
describe.concurrent('Sidebar', () => {
|
||||||
it('Start default', async() => {
|
it('Start default', () => {
|
||||||
const handleClick = vi.fn();
|
const handleClick = vi.fn();
|
||||||
render(
|
render(
|
||||||
<Sidebar
|
<Sidebar
|
||||||
|
@ -23,7 +23,7 @@ describe.concurrent('Sidebar open', () => {
|
||||||
expect(handleClick).toHaveBeenCalledTimes(1);
|
expect(handleClick).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Start close', async() => {
|
it('Start close', () => {
|
||||||
render(<Sidebar
|
render(<Sidebar
|
||||||
componentOptions={[]}
|
componentOptions={[]}
|
||||||
isOpen={false}
|
isOpen={false}
|
||||||
|
@ -36,11 +36,9 @@ describe.concurrent('Sidebar open', () => {
|
||||||
expect(stuff).toBeNull();
|
expect(stuff).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('With stuff', async() => {
|
it('With stuff', () => {
|
||||||
const Type = 'stuff';
|
const Type = 'stuff';
|
||||||
const handleButtonClick = vi.fn((type: string) => {
|
const handleButtonClick = vi.fn();
|
||||||
expect(type).toBe(Type);
|
|
||||||
});
|
|
||||||
render(<Sidebar
|
render(<Sidebar
|
||||||
componentOptions={[
|
componentOptions={[
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue