diff --git a/apps/web/src/stores/__tests__/queue.spec.ts b/apps/web/src/stores/__tests__/queue.spec.ts index f4c46dbb..18225e4b 100644 --- a/apps/web/src/stores/__tests__/queue.spec.ts +++ b/apps/web/src/stores/__tests__/queue.spec.ts @@ -64,7 +64,12 @@ describe('clips.ts', () => { const queue = useQueue() queue.add(clipFromTwitch) queue.add(clipFromKick) - queue.play({ id: 'not-valid', provider: ClipProvider.TWITCH, submitters: [] }) + queue.play({ + ...clipFromTwitch, + id: 'not-valid', + provider: ClipProvider.TWITCH, + submitters: [] + }) expect(queue.upcoming.toArray()).toContainEqual(clipFromTwitch) expect(queue.upcoming.toArray()).toContainEqual(clipFromKick) expect(queue.current).toEqual(undefined) @@ -79,7 +84,12 @@ describe('clips.ts', () => { queue.remove(clipFromTwitch) expect(queue.upcoming.toArray()).not.toContainEqual(clipFromTwitch) expect(queue.upcoming.size()).toEqual(queueLength - 1) - queue.remove({ id: 'not-valid', provider: ClipProvider.TWITCH, submitters: [] }) + queue.remove({ + ...clipFromTwitch, + id: 'not-valid', + provider: ClipProvider.TWITCH, + submitters: [] + }) expect(queue.upcoming.size()).toEqual(queueLength - 1) }) @@ -173,14 +183,19 @@ describe('clips.ts', () => { const queue = useQueue() const settings = useSettings() settings.queue.limit = 2 - queue.add({ id: 'test', submitters: ['s'], provider: ClipProvider.TWITCH }) - queue.add({ id: 'test2', submitters: ['s'], provider: ClipProvider.TWITCH }) - queue.add({ id: 'test3', submitters: ['s'], provider: ClipProvider.TWITCH }) + queue.add({ ...clipFromTwitch, id: 'test', submitters: ['s'], provider: ClipProvider.TWITCH }) + queue.add({ ...clipFromTwitch, id: 'test2', submitters: ['s'], provider: ClipProvider.TWITCH }) + queue.add({ ...clipFromTwitch, id: 'test3', submitters: ['s'], provider: ClipProvider.TWITCH }) expect(queue.upcoming.size()).toEqual(2) }) it('adds clips that are already there (even when full) to update submitters', () => { - const clip: Clip = { id: 'test', submitters: ['testsubmitter'], provider: ClipProvider.TWITCH } + const clip: Clip = { + ...clipFromTwitch, + id: 'test', + submitters: ['testsubmitter'], + provider: ClipProvider.TWITCH + } const queue = useQueue() const settings = useSettings() settings.queue.limit = 1 diff --git a/packages/providers/src/kick.ts b/packages/providers/src/kick.ts index a7620f0f..98e5ff92 100644 --- a/packages/providers/src/kick.ts +++ b/packages/providers/src/kick.ts @@ -1,6 +1,7 @@ import kick from '@cq/services/kick' -import { BaseClipProvider, Clip, ClipProvider, PlayerFormat } from './types' +import type { Clip, PlayerFormat } from './types' +import { BaseClipProvider, ClipProvider } from './types' export class KickProvider extends BaseClipProvider { public name = ClipProvider.KICK diff --git a/packages/providers/src/twitch.ts b/packages/providers/src/twitch.ts index 199f5fb0..5cc9b579 100644 --- a/packages/providers/src/twitch.ts +++ b/packages/providers/src/twitch.ts @@ -1,12 +1,7 @@ import twitch from '@cq/services/twitch' -import { - BaseClipProvider, - Clip, - ClipProvider, - ClipProviderCtxCallback, - PlayerFormat -} from './types' +import type { Clip, ClipProviderCtxCallback, PlayerFormat } from './types' +import { BaseClipProvider, ClipProvider } from './types' export class TwitchProvider extends BaseClipProvider { public name = ClipProvider.TWITCH diff --git a/packages/providers/src/youtube.ts b/packages/providers/src/youtube.ts index c3ffad11..c646519c 100644 --- a/packages/providers/src/youtube.ts +++ b/packages/providers/src/youtube.ts @@ -1,6 +1,7 @@ import youtube from '@cq/services/youtube' -import { BaseClipProvider, Clip, ClipProvider, PlayerFormat } from './types' +import type { Clip, PlayerFormat } from './types' +import { BaseClipProvider, ClipProvider } from './types' export class YouTubeProvider extends BaseClipProvider { public name = ClipProvider.YOUTUBE