test(translate): migrate element-translate-ng to vitest#1574
test(translate): migrate element-translate-ng to vitest#1574
Conversation
There was a problem hiding this comment.
Code Review
The pull request successfully migrates the element-translate-ng project to use Vitest for unit testing, replacing Karma. This involves updating angular.json to use the @angular/build:unit-test builder, updating relevant package.json dependencies, and adjusting test files to use Vitest's vi.spyOn instead of Jasmine's spyOn. The tsconfig.lib.json and tsconfig.spec.json files have also been updated to reflect the new testing environment and exclude mock files from the library build. The README.md has been updated to reflect the change in testing framework. One area for improvement is to align dependency versioning in package.json with the established major version rule, as highlighted in the specific comments.
cca2a71 to
6d79e4a
Compare
|
Documentation. Coverage Reports: |
| "projects/element-translate-ng/**/*.module.ts", | ||
| "projects/element-translate-ng/**/testing/**/*.ts" | ||
| ] | ||
| "browsers": ["chromium"] |
There was a problem hiding this comment.
We should keep headless default.
"test": {
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "projects/element-translate-ng/tsconfig.spec.json",
"browsers": ["chromiumheadless"]
},
"configurations": {
"browser": {
"browsers": ["chromium"]
}
}
}
There was a problem hiding this comment.
This isn't necessary, with environment 'CI=true' vitest will launch chromium headless
Uh oh!
There was an error while loading. Please reload this page.