summaryrefslogtreecommitdiff
path: root/ui/tests/lib/components/Channel.svelte.test.js
blob: e43fa122412571a93103c7d416643c341d6af786 (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 Channel from '$lib/components/Channel.svelte';

let component;

describe('Channel', () => {
  beforeEach(() => {
    component = mount(Channel, {
      target: document.body, // `document` exists because of jsdom
    });
    flushSync();
  });

  afterEach(() => {
    unmount(component);
  });

  test('mounts', async () => {
    expect(component).toBeTruthy();
  });
});