fix: remove BrowserDynamicTestingModule override - #13
Open
geromegrignon wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes references to BrowserDynamicTestingModule from Spectator factory helpers so the library no longer pulls in @angular/platform-browser-dynamic/testing, addressing the Angular 20+ deprecation and the missing dependency error reported in #12.
Changes:
- Removed
BrowserDynamicTestingModuleimports from component/host/pipe/directive factory helpers. - Removed no-op
TestBed.overrideModule(BrowserDynamicTestingModule, {})calls from TestBed setup paths. - Simplified template override paths to rely on
TestBed.overrideComponent(...)directly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/spectator/src/lib/spectator/create-factory.ts | Removes the no-op override of BrowserDynamicTestingModule during component factory setup to avoid pulling platform-browser-dynamic/testing. |
| projects/spectator/src/lib/spectator-pipe/create-factory.ts | Drops BrowserDynamicTestingModule usage and uses TestBed.overrideComponent for host template overrides without the extra module override. |
| projects/spectator/src/lib/spectator-host/create-factory.ts | Removes the no-op BrowserDynamicTestingModule override from host factory TestBed initialization. |
| projects/spectator/src/lib/spectator-directive/create-factory.ts | Removes BrowserDynamicTestingModule from directive factory and keeps host template override via TestBed.overrideComponent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Any chance we can get this merged soon? |
|
+1 |
dominicbachmann
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Remove the unused BrowserTestingModule override
Related issues
Fixes #12
Type of change
Breaking changes
None
Test plan
npm run buildnpm testnpm run lintChecklist
Additional context