Skip to content

test: Use Vitest as test runner #967

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drwpow
Copy link

@drwpow drwpow commented Apr 21, 2025

Draft PR as part of #965, just to show suggested starting point

@drwpow drwpow force-pushed the drwpow/vitest branch 2 times, most recently from 5893b98 to bf10958 Compare April 21, 2025 18:10
},
},

// TODO: enable for browser tests
Copy link
Author

Choose a reason for hiding this comment

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

Note: I was able to get the browser tests set up locally, but it (correctly) errs on

module "browserslistToTargets.js" declares no export named "browserslistToTargets"

as it’s CJS, attempting to run as an ESM import. I don’t want to touch any runtime with a 10' pole, especially not in this PR, so maybe there’s a way we could build this file or something just to get the proper behavior in tests.

@@ -5,6 +5,7 @@
"moduleResolution": "node",
"isolatedModules": true,
"noEmit": true,
"strict": true
"strict": true,
"skipLibCheck": true
Copy link
Author

@drwpow drwpow Apr 21, 2025

Choose a reason for hiding this comment

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

Necessary for Vitest, unfortunately 😕. But also, this is fine to add IMO as this PR does add more typechecking to tests (we likely would have hit this at some point anyway adding more typechecking).

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.

1 participant