summaryrefslogtreecommitdiff
path: root/ui/tests/lib/components/ChannelList.svelte.test.js
blob: e6ec64de295b4379a9b5358233c3f65f4c8f4d71 (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 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();
  });
});