import { flushSync, mount, unmount } from 'svelte'; import { afterEach, beforeEach, describe, expect, test } from 'vitest'; import ChannelList from '$lib/components/ChannelList.svelte'; let component; describe('ChannelList', () => { beforeEach(() => { component = mount(ChannelList, { target: document.body, // `document` exists because of jsdom }); flushSync(); }); afterEach(() => { unmount(component); }); test('mounts', async () => { expect(component).toBeTruthy(); }); });