blob: 3b1d299431e048d6e1df6d5ccb1a14a8ac0c69bf (
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 LogIn from '$lib/components/LogIn.svelte';
let component;
describe('LogIn', () => {
beforeEach(() => {
component = mount(LogIn, {
target: document.body, // `document` exists because of jsdom
});
flushSync();
});
afterEach(() => {
unmount(component);
});
test('mounts', async () => {
expect(component).toBeTruthy();
});
});
|