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
use Babel instead of ts-jest to speed up and simplify tests #3959
Conversation
b177823
to
0e8c0c9
Compare
f2dc1a5
to
2c593cb
Compare
I don't currently see compile errors from test files in VS Code (without explicitly opening the file). It seems like they are not checked by the |
2c593cb
to
ad50e4c
Compare
ad50e4c
to
0040acc
Compare
72ba85b
to
a8ef0cf
Compare
@felixfbecker given that @sqs is out on pat leave, is this something that should be merged, or should we close this? |
a8ef0cf
to
da87d7f
Compare
@beyang keep open pls This can be merged when @babel/plugin-transform-typescript 7.5.0 is released, which should be soon. That version will incorporate the fix in babel/babel#9610, which should solve the problem that causes CI to fail. |
@sqs 7.5.0 was just released :) |
@felixfbecker Re: vscode not showing errors from not-yet-opened files, I am indeed seeing that problem, but I am actually not seeing any of the tasks work:
It doesn't seem to be related to this PR, so I'm not going to block this PR. |
15b17eb
to
6055ef0
Compare
Removed typechecking from jest tests (by removing ts-jest and just using Babel's TypeScript transpilation, per https://jestjs.io/docs/en/getting-started#using-typescript). This makes tests run faster (~2s vs. ~9s for a single test after making a change to a `.ts` file) and simplifies their build configuration (by removing an unnecessary tool, ts-jest, from our toolchain). You should instead rely on your editor (and CI) for typechecking. Babel is a good choice because it is the standard for transpilation, and tslint is being deprecated in favor of Babel + eslint (so we need to switch soon anyway to get the latest lint rules, such as those for React hooks).
6055ef0
to
f29106f
Compare
Codecov Report
@@ Coverage Diff @@
## master #3959 +/- ##
==========================================
- Coverage 48.06% 46.44% -1.63%
==========================================
Files 733 730 -3
Lines 44817 44419 -398
Branches 1763 2610 +847
==========================================
- Hits 21541 20630 -911
- Misses 21300 21813 +513
Partials 1976 1976
|
🎉 |
Removed typechecking from jest tests (by removing ts-jest and just using Babel's TypeScript transpilation, per https://jestjs.io/docs/en/getting-started#using-typescript). This makes tests run faster (~2s vs. ~9s for a single test after making a change to a
.ts
file) and simplifies their build configuration (by removing an unnecessary tool, ts-jest, from our toolchain). You should instead rely on your editor (and CI) for typechecking.Babel is a good choice because it is the standard for transpilation, and tslint is being deprecated in favor of Babel + eslint (so we need to switch soon anyway to get the latest lint rules, such as those for React hooks).