-
Notifications
You must be signed in to change notification settings - Fork 100
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
Used SWC instead of Babel for Jest tests #1367
Conversation
"@babel/plugin-proposal-optional-chaining": "7.16.7", | ||
"@babel/preset-env": "7.16.11", | ||
"@babel/preset-typescript": "7.16.7", | ||
"@swc/jest": "^0.2.17", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1370 mentioned that @swc/core
should be added too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
jsc: { | ||
target: "es2021", | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of swc-project/jest#75, these are no longer required.
{ | |
jsc: { | |
target: "es2021", | |
}, | |
}, |
PR Checklist
status: accepting prs
Overview
Uses
@swc/jest
instead ofbabel-jest
.jest --clearCache
before each command. Terminal was in focus and no actions taken on open programs during test runs.jest
jest --coverage --maxWorkers=2
Sorted raw time data:
jest
: 16.151, 17.686, 18.548, 18.738, 19.278, 19.676, 20.091jest --coverage --maxWorkers=2
: 22.320, 23.239, 24.898, 25.109, 27.087, 27.724, 28.649jest
: 11.488, 11.862, 12.709, 13.558, 13.932, 14.215, 14.351jest --coverage --maxWorkers=2
: 19.839, 20.708, 22.430, 23.670, 24.704, 25.013, 25.248