Skip to content

fix: remove BrowserDynamicTestingModule override - #13

Open
geromegrignon wants to merge 1 commit into
mainfrom
fix-browsertestingmodule-override
Open

fix: remove BrowserDynamicTestingModule override#13
geromegrignon wants to merge 1 commit into
mainfrom
fix-browsertestingmodule-override

Conversation

@geromegrignon

Copy link
Copy Markdown
Contributor

Description

Remove the unused BrowserTestingModule override

Related issues

Fixes #12

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes the public API)
  • Documentation only
  • Refactor, test, or chore (no user-facing change)

Breaking changes

None

Test plan

  • npm run build
  • npm test
  • npm run lint
  • Verified in the demo app (if applicable)

Checklist

  • Issue discussed or bug clearly described (link issue when applicable)
  • Tests added or updated for behavioral changes
  • Documentation updated (README, JSDoc, migration notes as needed)
  • Public API changes documented; breaking changes called out
  • CHANGELOG updated (if the repository maintains one and the change is user-facing)
  • Commit messages follow Conventional Commits
  • I agree to follow the OpenNG Foundation Code of Conduct

Additional context

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BrowserDynamicTestingModule imports 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.

@Martinspire

Copy link
Copy Markdown

Any chance we can get this merged soon?

@elmarbeckmann

Copy link
Copy Markdown

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Missing @angular/platform-browser-dynamic when installed in new projects

5 participants