Skip to content

Migrate frontend tests from karma to vitest #7105

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged

Migrate frontend tests from karma to vitest #7105

merged 1 commit into from
Apr 28, 2025

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Apr 24, 2025

Depends on hypothesis/frontend-build#722
Depends on hypothesis/frontend-testing#76

This PR is the equivalent to hypothesis/frontend-shared#1947, but for client repository.

TODO

@acelaya acelaya marked this pull request as draft April 24, 2025 13:15
@acelaya acelaya force-pushed the vitest-migration branch 3 times, most recently from 9987501 to 3abfd0a Compare April 25, 2025 08:44
@acelaya acelaya marked this pull request as ready for review April 25, 2025 08:44
@acelaya acelaya requested a review from robertknight April 25, 2025 08:44
@robertknight
Copy link
Member

robertknight commented Apr 25, 2025

I saw some warnings about circular dependencies when building the tests:

[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/addProperty.js -> node_modules/chai/lib/chai.js (undefined)
[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/addMethod.js -> node_modules/chai/lib/chai.js (undefined)
[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/overwriteProperty.js -> node_modules/chai/lib/chai.js (undefined)
[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/overwriteMethod.js -> node_modules/chai/lib/chai.js (undefined)
[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/addChainableMethod.js -> node_modules/chai/lib/chai.js (undefined)
[16:24:22] Rollup warning: Circular dependency: node_modules/chai/lib/chai.js -> node_modules/chai/lib/chai/utils/index.js -> node_modules/chai/lib/chai/utils/overwriteChainableMethod.js -> node_modules/chai/lib/chai.js (undefined)

I don't see these warnings on main. Otherwise everything worked.

@robertknight
Copy link
Member

The chai version in this repo is v4.3.0. The client repository, which doesn't show this issue, has v5.2.0.

Copy link
Member

@robertknight robertknight left a comment

Choose a reason for hiding this comment

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

Chai needs to be updated to the latest v5.x version to fix circular dependency warnings when building tests. Otherwise LGTM.

@acelaya acelaya merged commit 9b9bbc7 into main Apr 28, 2025
9 checks passed
@acelaya acelaya deleted the vitest-migration branch April 28, 2025 07:30
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