Use CommonJS tsconfig for testing
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"pretest": "rimraf ./build",
|
||||
"test": "mocha -r ts-node/register -r tsconfig-paths/register \"src/**/*.ts\"",
|
||||
"test": "TS_NODE_PROJECT=\"tsconfig.spec.json\" mocha -r ts-node/register -r tsconfig-paths/register \"src/**/*.ts\"",
|
||||
"test.coverage": "nyc npm test",
|
||||
"test.watch": "npm test -- --watch",
|
||||
"prepublishOnly": "npm run build --production",
|
||||
|
7
tsconfig.spec.json
Normal file
7
tsconfig.spec.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user