Skip to content

test(translate): migrate element-translate-ng to vitest#1574

Open
spliffone wants to merge 1 commit intomainfrom
test/element-translate-ng-vitest
Open

test(translate): migrate element-translate-ng to vitest#1574
spliffone wants to merge 1 commit intomainfrom
test/element-translate-ng-vitest

Conversation

@spliffone
Copy link
Member

@spliffone spliffone commented Feb 26, 2026

Describe in detail what your merge request does and why. Add relevant
screenshots and reference related issues via Closes #XY or Related to #XY.


@spliffone spliffone requested review from a team as code owners February 26, 2026 11:10
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@spliffone spliffone force-pushed the test/element-translate-ng-vitest branch from cca2a71 to 6d79e4a Compare February 26, 2026 11:16
@github-actions
Copy link

Code Coverage

@github-actions
Copy link

"projects/element-translate-ng/**/*.module.ts",
"projects/element-translate-ng/**/testing/**/*.ts"
]
"browsers": ["chromium"]
Copy link
Member

Choose a reason for hiding this comment

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

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"]
            }
          }
        }

Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't necessary, with environment 'CI=true' vitest will launch chromium headless

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.

2 participants