Skip to content

Commit

Permalink
Add package tsconfig-paths and integrate it into ts-test script
Browse files Browse the repository at this point in the history
Ts-node does not load the paths from tsconfig.json by itself. Thus in
the tests run with ts-node the custom types for external packages (and
things like our offspring) can't be resolved.
The package tsconfig-paths has resulted from a discussion about this
topic on
github (TypeStrong/ts-node#138 (comment)),
which loads said modules.
  • Loading branch information
yeldiRium committed Aug 5, 2019
1 parent 87a2c1f commit bd5b882
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@
"supertest": "4.0.2",
"terminal-img": "1.1.1",
"ts-node": "8.3.0",
"tsconfig-paths": "3.8.0",
"twitter": "1.7.1",
"typescript": "3.5.3"
},
"scripts": {
"ts-build": "npx tsc",
"ts-test": "npx mocha --async-only --bail --require ts-node/register --recursive --ui tdd $(find test -name '*.ts' ! -path '*network*')",
"ts-test": "npx mocha --async-only --bail --require ts-node/register --require tsconfig-paths/register --recursive --ui tdd $(find test -name '*.ts' ! -path '*network*')",
"build": "run-script-os",
"build:darwin:linux": "node bin/build.js --color",
"build:win32": "node bin\\build.js --color",
Expand Down

0 comments on commit bd5b882

Please sign in to comment.