fix: update import paths for jest presets to include .js extension

This commit is contained in:
4gray committed 2026-03-28 16:03:07 +01:00
1 parent 0a80dd5050
commit 85f08929e8
3 files changed
+20 -6

No files matched your search

+1 -1
View File
@@ -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,
+18 -4
View File
@@ -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 -1
View File
@@ -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,