Based on the built-in testrunner I want to run my tests inside a test directory. When dealing with .js files I'm using node --test ./test/**/*Tests.js
. When dealing with .ts files I could use tsc && node --test ./build/**/*Tests.js
.
But is it possible to use ts-node instead of testing against the build directory?
以下命令对我有用
node --test --require ts-node/register ./test/**/*Tests.ts
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.