piotrwitek / ts-mocha

Mocha thin wrapper that allows running TypeScript tests with TypeScript runtime (ts-node) to get rid of compilation complexity
MIT License
190 stars 25 forks source link

ENUMs are not picked up from script #44

Open Streek opened 5 years ago

Streek commented 5 years ago

using ts-node ENV_FILE=development ts-node --inspect -r ts-node/register -r ./src/shared/types -r ./env -r tsconfig-paths/register src/start.ts using ts-mocha NODE_ENV=development nyc ts-mocha -r ./env -r src/shared/types --paths ./tests/**/*.ts --exit"

src/shared/types.ts Contains interfaces and types and enums that are not exported (not a module). Types and interfaces are picked up by ts-mocha but not the enums. Everything works fine when running server directly with ts-node.

aside: the path to ./src and /src are different because the relative path does not work on ts-mocha but /src does

piotrwitek commented 5 years ago

Hey, Which version of ts-node have you tested while testing directly?

Streek commented 5 years ago

v8.3.0