Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 17 Jest ReferenceError: Cannot access 'NgxMatomoRouterModule' before initialization #79

Closed
BrunelaManaj opened this issue Jan 10, 2024 · 6 comments
Assignees
Labels
bug Something isn't working P1 released

Comments

@BrunelaManaj
Copy link

After updating to Angular 17 and ngx-matomo-client 6.0.0 there are problems with the unit tests of the components/service, where Matomo Directives or MatomoTracker is being used. NgxMatomoRouterModule is not being used in the app, the matomo configuration is being done through the standalone function provideMatomo() and withRouter().
The problem occurs only after updating to the version 6.0.0 of matomo. In the version 5.0.4 there are no problems.
Do you have any ideas, how we can use solve this problem?

@EmmanuelRoux EmmanuelRoux self-assigned this Jan 14, 2024
@EmmanuelRoux EmmanuelRoux added bug Something isn't working P1 labels Jan 14, 2024
@EmmanuelRoux
Copy link
Owner

Hi @BrunelaManaj, thanks for reporting this bug

I've published a test version: could you please try using version 6.0.1-fix-79.1 of ngx-matomo-client?

If that does not solve the problem, could you provide a repro so I can investigate further?

@BrunelaManaj
Copy link
Author

Thanks a lot for your reply. I tested the version 6.0.1-fix-79.1 and there are no unit tests problems anymore.

@EmmanuelRoux
Copy link
Owner

Thanks!

Version 6.0.1 (including this fix) will be released today

@BrunelaManaj
Copy link
Author

Perfect, thanks a lot!

EmmanuelRoux added a commit that referenced this issue Jan 15, 2024
## [6.0.1](v6.0.0...v6.0.1) (2024-01-15)

### Bug Fixes

* **router:** fix router module constructor token declaration ([82e0aa2](82e0aa2)), closes [#79](#79)
@EmmanuelRoux
Copy link
Owner

🎉 This issue has been resolved in version 6.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matt-senseye
Copy link

Thanks for the fix. v6.0.1 fixed our Jest issues too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 released
Projects
None yet
Development

No branches or pull requests

3 participants