diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-11-15 22:45:53 -0500 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-11-15 22:45:53 -0500 |
| commit | a5945c50c41a0a41104a0c28ad1279ea3f9255f9 (patch) | |
| tree | afd84f6e761e74e881ac182c6d40b1ad14eb4fdd /ui | |
| parent | 8a7cc9f8859c14b60da870cee199110e71e0f5da (diff) | |
Ratchet up coverage
Just basic "will it mount?" tests for more components.
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/tests/lib/components/ActiveChannel.svelte.test.js | 22 | ||||
| -rw-r--r-- | ui/tests/lib/components/Channel.svelte.test.js | 22 | ||||
| -rw-r--r-- | ui/tests/lib/components/ChannelList.svelte.test.js | 22 | ||||
| -rw-r--r-- | ui/tests/lib/components/LogIn.svelte.test.js | 22 | ||||
| -rw-r--r-- | ui/tests/lib/components/MessageRun.svelte.test.js | 22 |
5 files changed, 110 insertions, 0 deletions
diff --git a/ui/tests/lib/components/ActiveChannel.svelte.test.js b/ui/tests/lib/components/ActiveChannel.svelte.test.js new file mode 100644 index 0000000..34e92d3 --- /dev/null +++ b/ui/tests/lib/components/ActiveChannel.svelte.test.js @@ -0,0 +1,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(); + }); +}); diff --git a/ui/tests/lib/components/Channel.svelte.test.js b/ui/tests/lib/components/Channel.svelte.test.js new file mode 100644 index 0000000..e43fa12 --- /dev/null +++ b/ui/tests/lib/components/Channel.svelte.test.js @@ -0,0 +1,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(); + }); +}); diff --git a/ui/tests/lib/components/ChannelList.svelte.test.js b/ui/tests/lib/components/ChannelList.svelte.test.js new file mode 100644 index 0000000..e6ec64d --- /dev/null +++ b/ui/tests/lib/components/ChannelList.svelte.test.js @@ -0,0 +1,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(); + }); +}); diff --git a/ui/tests/lib/components/LogIn.svelte.test.js b/ui/tests/lib/components/LogIn.svelte.test.js new file mode 100644 index 0000000..3b1d299 --- /dev/null +++ b/ui/tests/lib/components/LogIn.svelte.test.js @@ -0,0 +1,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(); + }); +}); diff --git a/ui/tests/lib/components/MessageRun.svelte.test.js b/ui/tests/lib/components/MessageRun.svelte.test.js new file mode 100644 index 0000000..480ce98 --- /dev/null +++ b/ui/tests/lib/components/MessageRun.svelte.test.js @@ -0,0 +1,22 @@ +import { flushSync, mount, unmount } from 'svelte'; +import { afterEach, beforeEach, describe, expect, test } from 'vitest'; +import MessageRun from '$lib/components/MessageRun.svelte'; + +let component; + +describe('MessageRun', () => { + beforeEach(() => { + component = mount(MessageRun, { + target: document.body, // `document` exists because of jsdom + }); + flushSync(); + }); + + afterEach(() => { + unmount(component); + }); + + test('mounts', async () => { + expect(component).toBeTruthy(); + }); +}); |
