Skip to content
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

test(ballot-interpreter): switch from jest to vitest #5705

Merged
merged 12 commits into from
Dec 10, 2024

Conversation

eventualbuddha
Copy link
Collaborator

@eventualbuddha eventualbuddha commented Dec 10, 2024

Overview

Closes #5708
Switch from jest to vitest in libs/ballot-interpreter.

Demo Video or Screenshot

n/a

Testing Plan

Automated.

@eventualbuddha eventualbuddha changed the title Brian/test/ballot interpreter/vitest test(ballot-interpreter): switch from jest to vitest Dec 10, 2024
Base automatically changed from jonah/test-utils-vitest to vitest December 10, 2024 16:49
vitest.config.shared.ts Outdated Show resolved Hide resolved
libs/test-utils-vitest/package.json Outdated Show resolved Hide resolved
vitest.config.shared.ts Outdated Show resolved Hide resolved
libs/ballot-interpreter/vitest.config.ts Outdated Show resolved Hide resolved
@eventualbuddha eventualbuddha force-pushed the brian/test/ballot-interpreter/vitest branch from f0d1834 to 0e3a2b7 Compare December 10, 2024 17:34
We want to build on top of the `vitest` version.
- convert `ballot-interpreter` benchmarks to `vitest`
- convert `test-utils-vitest` to `type: module` so that the built version is ESM; this is needed because you're not allowed to `require('vitest')`
- run `ballot-interpreter` tests as modules by renaming to `.mts`
Was getting this in CI:
```
RangeError: options.minThreads and options.maxThreads must not conflict
 ❯ new Tinypool ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/index.js:980:13
 ❯ createForksPool ../../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/chunks/resolveConfig.RxKrDli4.js:6755:16
 ❯ forks ../../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/chunks/resolveConfig.RxKrDli4.js:7663:20
```
@eventualbuddha eventualbuddha merged commit c72ac3b into vitest Dec 10, 2024
63 checks passed
@eventualbuddha eventualbuddha deleted the brian/test/ballot-interpreter/vitest branch December 10, 2024 20:09
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