blob: 34e92d343b9542201fa1ec49b1540641c7e8ea55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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();
});
});
|