refactor(staples): convert dynamic userEvent import to static in CategorySection test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 09:30:19 +02:00
parent 2d6ddf0e48
commit df95462094

View File

@@ -1,5 +1,6 @@
import { describe, it, expect, vi } from 'vitest';
import { render, screen } from '@testing-library/svelte';
import { userEvent } from '@testing-library/user-event';
import CategorySection from './CategorySection.svelte';
const mockIngredients = [
@@ -34,7 +35,6 @@ describe('CategorySection', () => {
});
it('calls onToggle with ingredient id and new value when chip is clicked', async () => {
const { userEvent } = await import('@testing-library/user-event');
const user = userEvent.setup();
const onToggle = vi.fn();
render(CategorySection, {