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

Migrate to vitest #1590

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Migrate to vitest #1590

merged 1 commit into from
Mar 16, 2024

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Mar 16, 2024

Closes #1591

Note

After this PR, @jest/schemas dependency remains in package-lock.json.
This is because Vitest's snapshot mechanism (Jest has it too) depends on pretty-format that depends on @jest/schemas.

Performance comparison

The below numbers are collected in get-global-config directory.

Before

❯ npm run test

> test
> jest

 PASS  src/run.test.ts
  ✓ default (2 ms)
  ✓ plan_workflow_name is required (13 ms)
  ✓ customize (1 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        2.024 s
Ran all test suites.

After

❯ npm run test

> test
> vitest --run


 RUN  v1.4.0 /Users/exoego/IdeaProjects/tfaction/get-global-config

 ✓ src/run.test.ts (3)
   ✓ default
   ✓ plan_workflow_name is required
   ✓ customize

 Test Files  1 passed (1)
      Tests  3 passed (3)
   Start at  21:27:30
   Duration  232ms (transform 31ms, setup 0ms, collect 18ms, tests 3ms, environment 0ms, prepare 65ms)

@suzuki-shunsuke
Copy link
Owner

Thank you for your contribution!

This is still draft, but I leave a comment.

As I mentioned at #1528 (review) ,
could you open an issue (in this case, I prefer an issue over a discussion because the task is clear) before sending a pull request?
And in the issue, please describe why we migrate to Vitest.
Of course I know the background of this pull request, #1528 (comment)
but the issue would be useful when someone will track the change.
I don't want to accept a pull request without any issue or discussion except for trivial fix (typo, etc).

@suzuki-shunsuke
Copy link
Owner

Thank you for your contribution!

This is still draft, but I leave a comment.

As I mentioned at #1528 (review) , could you open an issue (in this case, I prefer an issue over a discussion because the task is clear) before sending a pull request? And in the issue, please describe why we migrate to Vitest. Of course I know the background of this pull request, #1528 (comment) but the issue would be useful when someone will track the change. I don't want to accept a pull request without any issue or discussion except for trivial fix (typo, etc).

Thank you for opening the issue.

@exoego exoego marked this pull request as ready for review March 16, 2024 12:30
@suzuki-shunsuke suzuki-shunsuke merged commit 5dd1bd0 into suzuki-shunsuke:main Mar 16, 2024
12 checks passed
@suzuki-shunsuke suzuki-shunsuke added this to the v1.3.1 milestone Mar 16, 2024
@exoego exoego deleted the vitest branch March 16, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Consider migration from Jest to Vitest
2 participants