mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
fix: update import paths for jest presets to include .js extension
This commit is contained in:
1 parent
0a80dd5050
commit
85f08929e8
3 files changed
+20
-6
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { nxPreset } from '@nx/jest/preset.js';
|
||||
import { createEsmPreset } from 'jest-preset-angular/presets';
|
||||
import { createEsmPreset } from 'jest-preset-angular/presets/index.js';
|
||||
|
||||
const angularEsmPreset = createEsmPreset({
|
||||
diagnostics: false,
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
import { routes } from './app.routes';
|
||||
|
||||
describe('app routes', () => {
|
||||
const workspaceRoute = routes.find((route) => route.path === 'workspace');
|
||||
const workspaceChildren = workspaceRoute?.children ?? [];
|
||||
let workspaceChildren: Array<{
|
||||
data?: Record<string, unknown>;
|
||||
loadComponent?: unknown;
|
||||
path?: string;
|
||||
}> = [];
|
||||
|
||||
beforeAll(async () => {
|
||||
jest.resetModules();
|
||||
jest.unstable_mockModule('@iptvnator/playlist/m3u/feature-player', () => ({
|
||||
M3uCollectionRouteComponent: class {},
|
||||
VideoPlayerComponent: class {},
|
||||
provideM3uWorkspaceRouteSession: () => [],
|
||||
}));
|
||||
|
||||
const { routes } = await import('./app.routes');
|
||||
const workspaceRoute = routes.find((route) => route.path === 'workspace');
|
||||
workspaceChildren = workspaceRoute?.children ?? [];
|
||||
});
|
||||
|
||||
it('routes M3U favorites and recent pages through the shared collection wrapper', async () => {
|
||||
const favoritesRoute = workspaceChildren.find(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { nxPreset } from '@nx/jest/preset.js';
|
||||
import { createEsmPreset } from 'jest-preset-angular/presets';
|
||||
import { createEsmPreset } from 'jest-preset-angular/presets/index.js';
|
||||
|
||||
const angularEsmPreset = createEsmPreset({
|
||||
diagnostics: false,
|
||||
|
||||
Reference in new issue
Block a user