Skip to content

chore(types): migrate from jest to vitest #10776

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

Conversation

aryaemami59
Copy link
Contributor

PR Checklist

Overview

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @aryaemami59!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 20f7c25
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/67fe5aebef6210000872e05a
😎 Deploy Preview https://deploy-preview-10776--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Feb 4, 2025

View your CI Pipeline Execution ↗ for commit 20f7c25.

Command Status Duration Result
nx typecheck ast-spec ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude website --... ✅ Succeeded 1s View ↗
nx run-many --target=clean ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-15 13:28:48 UTC

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.82%. Comparing base (7f32763) to head (20f7c25).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10776   +/-   ##
=======================================
  Coverage   90.82%   90.82%           
=======================================
  Files         497      497           
  Lines       50204    50204           
  Branches     8274     8274           
=======================================
  Hits        45600    45600           
  Misses       4589     4589           
  Partials       15       15           
Flag Coverage Δ
unittest 90.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aryaemami59 aryaemami59 force-pushed the chore/types-vitest-migration branch 17 times, most recently from f824e6b to 82abbe3 Compare February 10, 2025 17:49
@aryaemami59 aryaemami59 force-pushed the chore/types-vitest-migration branch 6 times, most recently from 45132fa to 77ecac2 Compare February 15, 2025 12:17
@JoshuaKGoldberg
Copy link
Member

Marking as blocked on #10582. We'd like to normalize test scripts & coverage calculations before making the jump in individual packages.

@JoshuaKGoldberg JoshuaKGoldberg added the blocked by another PR PRs which are ready to go but waiting on another PR label Feb 25, 2025
@aryaemami59 aryaemami59 force-pushed the chore/types-vitest-migration branch from 77ecac2 to 92e6e1e Compare February 27, 2025 06:19
@aryaemami59 aryaemami59 force-pushed the chore/types-vitest-migration branch from 217ccc6 to 6e15553 Compare April 5, 2025 17:05
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

ACK on the passWithNoTests: true, this looks good to start - thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit f30a20e into typescript-eslint:main Apr 15, 2025
52 of 53 checks passed
@aryaemami59 aryaemami59 deleted the chore/types-vitest-migration branch April 23, 2025 00:16
phaux pushed a commit to phaux/typescript-eslint that referenced this pull request Apr 24, 2025
* Install `vitest`

* Rename `jest.config.js` to `vitest.config.mts`

* chore(types): migrate to `vitest`

* Fix Vitest config

* Include `vitest.config.mts` in `tsconfig.spec.json`

* Explicitly enable `resolveJsonModule`

* Use `.replace` instead of `.split`

* Type check `vitest.config.mts` files using project references.

* Fix Vitest config

* Update `vitest` to version 3.1.1

* Update `@vitest/eslint-plugin` to version 1.1.39

* Fix `knip`

* Update `vite` to version 6.2.5

* Update `vite` to version 6.2.6

* Update `@vitest/eslint-plugin` to version 1.1.40

* Update `@vitest/eslint-plugin` to version 1.1.42

* Enable the new `vitest/prefer-describe-function-title` rule

* Use `vitestPlugin.configs.env`

* Try disabling remote cache

* Try disabling remote cache

* Try disabling remote cache

* Run `ast-spec:typecheck` during `postinstall` script

* Update `typecheck` output path in `nx.json`

* Fix `vitest` coverage output when run with `nx`

---------

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants