ts-node >= 7.x makes mocha unit tests hanging

Created on 29 Mar 2019  路  2Comments  路  Source: TypeStrong/ts-node

I'm using Mocha Version 6.0.2 in my project with ts-node for writing unit tests in TypeScript.

I'm starting mocha from the command line via:

mocha --require ts-node/register --ui bdd ./src/**/*.test.ts ./src/**/*.test.tsx

With ts-node 6.x I don't have any problems, but all ts-node versions after (7.x and 8.x) make mocha hanging without any output.

Is it possible to get a debug output from Mocha or ts-node to see what's going on?

Most helpful comment

I'm seeing the same thing with alsatian tests with ts-node 8.x but not with 7.0.1

All 2 comments

I'm seeing the same thing with alsatian tests with ts-node 8.x but not with 7.0.1

Duplicate of https://github.com/TypeStrong/ts-node/issues/754.

For now --transpile-only with the CLI should help.
See https://github.com/TypeStrong/ts-node#cli-and-programmatic-options.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

watzon picture watzon  路  3Comments

cevek picture cevek  路  4Comments

nehalist picture nehalist  路  3Comments

sanex3339 picture sanex3339  路  4Comments

OliverJAsh picture OliverJAsh  路  3Comments