Closed nickgartmann closed 6 years ago
I'm fine with changes that make it possible to use typescript, but not with adding any typescript-related thing to deps.
Why is typescript any different than babel, ie, babel-register etc?
This is my bad, I got down a weird rabbit hole and missed the obvious 🙃
Typescript support can be added through the "compiler" config option: "compiler": "node_modules/ts-node/register"
By adding ts-mocha as a dependency and adding
require('ts-mocha')
to the top of runMocha.js it is possible to enable typescript mocha tests with Jest.However, this solution forces typescript. Hoping you can advise on how to structure a change to add an optional configuration for enabling typescript. The tricky bit is that the
require('ts-mocha')
must come before therequire('mocha')
.