From 0bde1cfc7536244bfc39b0082823bdfdf7d6f89b Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 5 Aug 2026 21:24:52 +0000 Subject: [PATCH] fix(tests): load JIT compiler before router imports in seo.service.spec The PlatformLocation static initializer in @angular/common/router requires @angular/compiler to be loaded first. Move the compiler import before any Angular router/common imports so the JIT facade is available when the module loads. --- src/app/services/seo.service.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/services/seo.service.spec.ts b/src/app/services/seo.service.spec.ts index e8e4139..f1cf435 100644 --- a/src/app/services/seo.service.spec.ts +++ b/src/app/services/seo.service.spec.ts @@ -1,3 +1,7 @@ +// Load the JIT compiler BEFORE any Angular router/common imports so that +// injectables like PlatformLocation can be instantiated without TestBed. +import '@angular/compiler'; + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { Subject } from 'rxjs'; import { NavigationEnd } from '@angular/router';