You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-enable component specs (NgModule → standalone or module-scope fix) #4864
Re-enable the 43 *.component.spec.ts files that #4862 had to exclude. The new @angular/build:unit-test builder type-checks each component's template against the bundle's standalone scope (not the declaring NgModule's scope), so NgModule-declared components fail to resolve their template directives — [ngModel], <nz-dropdown-menu>, custom selectors like <texera-user-avatar>, etc. ~1000 NG8002/NG8001/NG8004 errors before exclusion.
Two viable approaches
A. Convert components to standalone (Angular's recommended direction)
Remove the component from the declaring NgModule's declarations array; add to imports instead.
Pros: future-proof, matches Angular team direction, eliminates the implicit NgModule scope dependency.
Cons: per-component imports list must be derived from what each template uses; ~43 components to migrate.
B. Schema overrides at the spec level
For each component spec, add schemas: [CUSTOM_ELEMENTS_SCHEMA] to TestBed setup so the strict template checker tolerates unknown elements.
Pros: faster to apply.
Cons: silently masks real bugs (typos in element names won't fail tests), and only addresses NG8001-style errors — [ngModel] not being resolved is NG8002 which schemas don't suppress.
Recommendation: A. Doing this in chunks (group by feature area) keeps each PR reviewable.
Affected files
43 files matching **/*.component.spec.ts. Currently excluded by tsconfig.spec.json and angular.json's test-target exclude.
Definition of done
All 43 component specs compile under the unit-test builder
Each runs to either passing or a documented runtime issue (likely a separate follow-up)
Exclusion entries removed from tsconfig.spec.json and angular.json
changed the title [-]Vitest migration: re-enable component specs (NgModule → standalone or module-scope fix)[/-][+]Re-enable component specs (NgModule → standalone or module-scope fix)[/+]on May 3, 2026
Activity
[-]Vitest migration: re-enable component specs (NgModule → standalone or module-scope fix)[/-][+]Re-enable component specs (NgModule → standalone or module-scope fix)[/+]refactor(frontend): convert all components to standalone (#4873)
chore(frontend): re-enable spec files that pass under standalone migr…
refactor(frontend): convert all components to standalone (apache#4873)
chore(frontend): re-enable spec files that pass under standalone migr…