-
Notifications
You must be signed in to change notification settings - Fork 454
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
fix: allow transformation of typescript files in node_modules #1385
Conversation
Pull Request Test Coverage Report for Build 4012
💛 - Coveralls |
Sure, do you have any suggestion for how we mock a node package with typescript files in it? I can think of two solutions:
|
I think the 1st solution is good for unit test and the 2nd solution is good with e2e test. I have a branch which includes a monorepo to test #1381 . You can check that branch if you want to include the monorepo tests. Simply run |
Thanks, I stole the example test from your branch. However, it doesn't seem to run during an ordinary |
Oh you just need to add npm run test:monorepo to travis.yml, npm test only runs test:unit and test:e2e. Monorepo tests are actually run with test:external |
Ok, done. Appveyor doesn't seem to like |
AppVeyor runs on Windows. It's slower than Travis because Travis is running on Linux. I think monorepo test on Travis is enough 👍 |
If it's erroring out on appveyor, wouldn't also potentially cause problems for Windows users? |
I have checked the log of AppVeyor it looked to me was the problem with the script to execute external project test, not ts-jest issue imo. jest '/test/index.spec.ts' -> this seems to not valid path for windows. We have an open issue to try out Travis Windows, perhaps we can try adding monorepo test first for Travis Windows since Travis seems to be faster than AppVeyor somehow. I’ve tried to run unit tests and e2e tests with Travis Windows but there are some problems with snapshots so I think we can try with monorepo tests there first. |
ok, it's all good then! |
@helmutschneider all good to go once you merge master :) |
@ahnpnl Do you want me to squash too? |
Oh it’s ok, I can do squash and merge once CI finishes. |
Do you plan to release this fix soon? |
I'll do that today |
done |
Fixes #1294 and possibly some of #1343
Most of this PR was derived from the implementation in ts-loader and a bunch of manual debugging. See #1381 for another possible solution.
Any comments are appreciated, especially in regards to testing. To make a meaningful E2E test we probably need a mocked package written in TS.