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