test: add angular test matrix#85
Conversation
Coverage report
Test suite run success10 tests passing in 2 suites. Report generated by 🧪jest coverage report action from ed5b65b Show full coverage report
|
There was a problem hiding this comment.
Pull request overview
Adds an Angular version test matrix to validate the library across Angular 15–21, with supporting Node/pnpm configuration for CI and local test execution.
Changes:
- Adds a GitHub Actions workflow for Angular matrix testing.
- Adds a local
bin/test-matrix.shhelper script with similar matrix logic. - Updates Node/test configuration and ignores generated test artifacts.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/test-matrix.yml |
Adds PR workflow to build and test the library across Angular versions. |
bin/test-matrix.sh |
Adds local shell script for running the same Angular matrix. |
package.json |
Adds Node engine requirement. |
.node-version |
Sets the repository Node version to 22. |
.gitignore |
Ignores pnpm store and matrix test logs. |
projects/fingerprintjs-pro-angular/tsconfig.spec.json |
Adds Node types for specs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TheUnderScorer
left a comment
There was a problem hiding this comment.
Looks good, I think the JS approach is way more readable compared to bash, so thanks for working on this!
One more suggestion: currently, the version matrix lives in two places - in the test-matrix.yml and in the constants.mjs. Perhaps we could introduce a single source of truth with a mapping of specific Node.js <-> Angular versions and use it in both places?
Co-authored-by: Juraj Uhlar <juro.uhlar@gmail.com>
…te test matrix logic
…rsive copy utility with fs.cpSync
… with older node versions
pnpm exec changesetto create a changeset. |
JuroUhlar
left a comment
There was a problem hiding this comment.
Some CI checks still seem to fail, otherwise LGTM, thanks!
This PR solves INTER-2234
CI/CD Improvements:
.github/workflows/test-matrix.yml) to run tests across Angular versions 15–21, each paired with the appropriate Node.js version, enhancing automated compatibility checks.Node.js Version Management:
.node-versionfile specifying Node.js version 18 for local development consistency.package.jsonto require Node.js version 18 or higher using theenginesfield, ensuring developers use a compatible Node.js version.Development Tooling:
package.jsonto include.mjsfiles in addition to.jsand.ts, improving code quality checks for modern JavaScript modules.test:matrixscript topackage.jsonto facilitate running matrix tests locally or in CI.