test(planner): clear shared mocks before each RecipePickerDrawer test
Adds beforeEach(vi.clearAllMocks) to prevent shared vi.fn() state in baseProps from leaking across tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #54.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen } from '@testing-library/svelte';
|
||||
import { userEvent } from '@testing-library/user-event';
|
||||
import RecipePickerDrawer from './RecipePickerDrawer.svelte';
|
||||
@@ -18,6 +18,7 @@ const baseProps = {
|
||||
};
|
||||
|
||||
describe('RecipePickerDrawer', () => {
|
||||
beforeEach(() => vi.clearAllMocks());
|
||||
describe('visibility', () => {
|
||||
it('renders drawer content when open=true', () => {
|
||||
render(RecipePickerDrawer, { props: baseProps });
|
||||
|
||||
Reference in New Issue
Block a user