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
jest transformers for babel and ts #842
Conversation
Two obstacles so far:
typescript-eslint/typescript-eslint#1697 @BBosman could we upgrade typescript-eslint to latest version 2.27.0? If there is no other complications, I can try update it in this branch too.
Update I found out how to manually export needed parts. |
@BBosman I tried to upgrade typescript-eslint 2.27.0 locally, but still see the error around |
Did you also update typescript itself? Because this repo is still at 2.7.x as far as I know. |
@BBosman thx! I will try to upgrade ts from 3.7 to 3.8. |
I will defer the typescript upgrade to @fkleuver as I got some syntax error in Guess ts introduced some breaking changes again...
|
In the meantime, I will use TS 3.7 syntax (downside is moving some devDeps to deps which only introduce types). @fkleuver no need special commonjs build for jest, I found out how to manually export needed parts. |
Good, |
Code Climate has analyzed commit 93ebe19 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 84.0% (0.0% change). View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
=======================================
Coverage 83.76% 83.76%
=======================================
Files 194 194
Lines 17334 17334
Branches 3564 3564
=======================================
Hits 14519 14519
Misses 2815 2815 Continue to review full report at Codecov.
|
Both @aurelia/babel-jest and @aurelia/ts-jest worked as expected in local dev. Pending implementing unit tests. |
Added unit tests. Double checked with jest skeletons aurelia/new#17 again. All good. |
Note the jest skeletons aurelia/new#17 use default jest jsdom env. Our au2 |
Wrap original jest transformers to support au2 conventions.
@aurelia/babel-jest
to wrapbabel-jest
@aurelia/ts-jest
to wrapts-jest
.Update to clarify my approach: because jest apparently does not support chained transformers (this does not match webpack's achitect on the loader chain), I have to wrap existing
babel-jest
andts-jest
to apply our conventions.