-
Notifications
You must be signed in to change notification settings - Fork 214
@neutrinojs/jest doesn't work transformer overrides for typescript #1044
Comments
Hi! I'm not overly familiar with TypeScript (on the ever-growing list of things to try out with existing projects), so this might be a daft question - but is there a specific reason for using ts-jest vs adding the @babel/preset-typescript preset to the existing Babel configuration used by |
@edmorley would you consider this issue resolved? |
Thanks - I'll grab the latest neutrino release, and I'll try the suggestion out and report back shortly on the outcome 👍 |
Hm, I'm afraid I've still had no luck with an alternative setup. I believe that there the original bug noted by this issue still exists, i.e. the merging functionality of Jest, but I'll try this again once the latest version of neutrino is released and create separate ticket if I spot any other issues 👍 Thanks everyone! |
@AlanFoster correct, this issue isn't resolved in the latest release, it would be for the next version. |
@AlanFoster, Hi! We've just released a Neutrino 9 beta, if you'd like to try it out? See #1129. |
Bug or issue?
Bug
Please try to answer the following questions:
8.3.0
"@neutrinojs/airbnb-base": "^8.3.0",
"@neutrinojs/jest": "^8.3.0",
"@neutrinojs/node": "^8.3.0",
Yarn 1.9.4
Node v8.9.4
macOS Sierra 10.12.6
Attempted to run Jest with typescript a file called
__tests__/index.spec.ts
with the following configuration to allow for typescript overrides:The jest configuration would be valid for typescript support, and my test would be picked up correctly.
The typescript transformer doesn't get picked up and instead the default transformer fails:
Inspecting the generated jest config file within my operating system's tmp directory I can see the
transform
value has been set:Upon further inspection I can see why the default transform is still being used instead of the expected
ts-jest
implementation:Current workaround
I am currently working around this with the following "fix":
Which now gives me a jest configuration file that works:
And Jest correctly uses the typescript transformer:
The text was updated successfully, but these errors were encountered: