build(jest): separated tsconfig for test related builds
MODIFY
jest.config.js
jest.config.js
@@ -10,5 +10,10 @@ module.exports = {
'ts',
'js',
'json'
- ]
+ ],
+ globals: {
+ 'ts-jest': {
+ tsConfigFile: './tsconfig.spec.json',
+ }
+ }
};

MODIFY
package.json
package.json
"postinstall": "npm run build",
"build": "lerna bootstrap",
"benchmark": "npm run build && make -C benchmarks",
- "lint": "tslint --config tslint.json --project tsconfig.json",
+ "lint": "tslint --config tslint.json --project tsconfig.spec.json",
"test": "jest --expand",
"test:coverage": "jest --expand --coverage",
"test:watch": "jest --expand --onlyChanged --watch",
"lint-staged": {
"*.ts": [
"prettier --write",
- "tslint --config tslint.json --project tsconfig.json",
+ "tslint --config tslint.json --project tsconfig.spec.json",
"git add",
"jest --bail --findRelatedTests --passWithNoTests"
]

ADD
tsconfig.spec.json
+{
+ "extends": "./tsconfig.json",
+ "exclude": []
+}

build(jest): separated tsconfig for test related builds