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