mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
test(playback): pass the spec type-check gate from master
- playback-data-access: align tsconfig.spec.json with the epg-data-access config #1705 updated (bundler resolution, global.d.ts for window.electron). - M3U recent-history spec: type the selectSignal override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
02ed4e589c
commit
fa6abbdf41
2 files changed
+7
-7
No files matched your search
@@ -3,12 +3,12 @@
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": false,
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"module": "preserve",
|
||||
"target": "es2016",
|
||||
"types": ["jest", "node"],
|
||||
"moduleResolution": "node10"
|
||||
"moduleResolution": "bundler"
|
||||
},
|
||||
"files": ["src/test-setup.ts"],
|
||||
"files": ["src/test-setup.ts", "../../../global.d.ts"],
|
||||
"include": [
|
||||
"jest.config.ts",
|
||||
"src/**/*.test.ts",
|
||||
|
||||
+4
-4
@@ -59,7 +59,7 @@ describe('VideoPlayerComponent — recently viewed history', () => {
|
||||
let component: VideoPlayerComponentInstance;
|
||||
let gate: PlaybackHistoryGate;
|
||||
const activePlaylist = signal<Partial<PlaylistMeta> | null>(null);
|
||||
const harnessSelectSignal = storeMock.selectSignal.getMockImplementation();
|
||||
const harnessSelectSignal = storeMock.selectSignal.getMockImplementation()!;
|
||||
|
||||
beforeAll(async () => {
|
||||
({ VideoPlayerComponent } = await import('./video-player.component'));
|
||||
@@ -74,11 +74,11 @@ describe('VideoPlayerComponent — recently viewed history', () => {
|
||||
externalSession.set(null);
|
||||
storeMock.dispatch.mockClear();
|
||||
activePlaylist.set({ _id: 'playlist-1', recentlyViewed: [] });
|
||||
storeMock.selectSignal.mockImplementation((selector: unknown) =>
|
||||
// The harness has no playlist meta; the history write updates it.
|
||||
storeMock.selectSignal.mockImplementation(((selector: unknown) =>
|
||||
selector === selectActivePlaylist
|
||||
? activePlaylist
|
||||
: harnessSelectSignal?.(selector)
|
||||
);
|
||||
: harnessSelectSignal(selector)) as typeof harnessSelectSignal);
|
||||
playlistsServiceMock.addM3uRecentlyViewed.mockClear();
|
||||
|
||||
await TestBed.configureTestingModule({
|
||||
|
||||
Reference in new issue
Block a user