You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably show tsc running as a separate action - although there are speed benefits to having a Babel plugin in Jest do the transpilation instead.
Related #1761 and #1454
Reacted by Florian, YuChao Liang, Vinicius De Antoni and fredrikredflag
I took at stab at having Jest execute the output of ts_library. You can see/clone my repo.
It seems the *.test.js file is not accessible at runtime, see the README.me for more details.
Activity
vdeantoni commentedon Sep 7, 2020
I took at stab at having Jest execute the output of ts_library. You can see/clone my repo.
It seems the *.test.js file is not accessible at runtime, see the README.me for more details.
fredrikredflag commentedon Oct 19, 2020
I managed to get this to fly @vdeantoni .
Some prerequisites:
exports_filesThe jest config needed to contain
moduleNameMapperin order to resolve mappings correctly (jest_typescript is my workspace name):After this is pretty straight forward, doesn't even need a custom macro.
alexeagle commentedon Oct 20, 2020
@fredrikredflag that's cool, do you have a suggestion where we could add this to our examples so other ppl can find the solution?
fredrikredflag commentedon Oct 20, 2020
@alexeagle In order to make easy to find, maybe just add another example called
jest_typescript?The
moduleNameMapperisn't the idea solution. But it works.I could do a PR for it.
alexeagle commentedon Oct 20, 2020
Ideally we'd keep a smallish number of examples so maybe add to the existing Jest one? A PR would be awesome, I don't have time ...
vdeantoni commentedon Oct 20, 2020
@fredrikredflag awesome, it worked great! thanks a lot
mrmeku commentedon Nov 3, 2020
I'll try to land an example in the near future now that jestjs/jest#9351 is finalized