Files
iptvnator/apps/web/jest.config.ts
T
MahdiHrmandClaude Fable 5 643dee1be3 feat(xtream): resume the latest series episode (#1187)
Dashboard Continue Watching now carries the exact saved season/episode into
Xtream series details and starts it at the persisted offset. Successful
external MPV/VLC launches persist the launched episode and retarget the
series CTA to "Play episode N". Recent-history rows keyed by an episode id
resolve their parent series before navigation.

Includes maintainer follow-ups: no zero-offset resume on failed position
loads, seriesXtreamId-gated resume targets for legacy rows, and patch
coverage raised from 76.7% to 93.9%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 15:49:22 +02:00

52 lines
1.6 KiB
TypeScript

import { nxPreset } from '@nx/jest/preset.js';
import { createEsmPreset } from 'jest-preset-angular/presets/index.js';
const angularEsmPreset = createEsmPreset({
diagnostics: false,
tsconfig: '<rootDir>/tsconfig.spec.json',
});
const coverageReporters = ['json', 'json-summary', 'lcovonly', 'text-summary'];
const collectCoverageFrom = [
'src/**/*.{ts,js,mjs,html}',
'!src/**/*.{spec,test}.ts',
'!src/**/test-setup.ts',
'!src/**/test-stubs/**',
'!src/**/*.generated.*',
'!src/**/environments/**',
'!src/**/index.ts',
];
export default {
...nxPreset,
...angularEsmPreset,
displayName: 'web',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/apps/web',
resolver: nxPreset.resolver,
moduleFileExtensions: Array.from(
new Set([
...(nxPreset.moduleFileExtensions ?? []),
...(angularEsmPreset.moduleFileExtensions ?? []),
])
),
testMatch: nxPreset.testMatch,
testEnvironmentOptions: {},
snapshotSerializers: angularEsmPreset.snapshotSerializers,
moduleNameMapper: {
...(angularEsmPreset.moduleNameMapper ?? {}),
tslib: 'tslib/tslib.es6.js',
'^iptv-playlist-parser$':
'<rootDir>/src/test-stubs/iptv-playlist-parser.mjs',
'^video.js$': '<rootDir>/src/test-stubs/video-js.js',
'^rxjs': '<rootDir>/../../node_modules/rxjs/dist/bundles/rxjs.umd.js',
'^uuid$': '<rootDir>/../../node_modules/uuid/wrapper.mjs',
},
transform: angularEsmPreset.transform,
transformIgnorePatterns: [],
extensionsToTreatAsEsm: angularEsmPreset.extensionsToTreatAsEsm,
coverageReporters,
collectCoverageFrom,
};