Use correct tsconfig.json in pure tests
This will change the pure tests Mocha setup to actually use the `tsconfig.json` located in the `test` directory. Before, it was using the root-level `tsconfig.json`. To ensure we are still using mostly the same settings, this will extend the `test/tsconfig.json` from the root-level `tsconfig.json`.
This commit is contained in:
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -44,10 +44,8 @@
|
||||
"bdd",
|
||||
"--colors",
|
||||
"--diff",
|
||||
"-r",
|
||||
"ts-node/register",
|
||||
"-r",
|
||||
"test/mocha.setup.js",
|
||||
"--config",
|
||||
".mocharc.json",
|
||||
"test/pure-tests/**/*.ts"
|
||||
],
|
||||
"stopOnEntry": false,
|
||||
|
||||
6
extensions/ql-vscode/.mocharc.json
Normal file
6
extensions/ql-vscode/.mocharc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"exit": true,
|
||||
"require": [
|
||||
"test/mocha.setup.js"
|
||||
]
|
||||
}
|
||||
@@ -1248,7 +1248,7 @@
|
||||
"watch:extension": "tsc --watch",
|
||||
"watch:webpack": "gulp watchView",
|
||||
"test": "npm-run-all -p test:*",
|
||||
"test:unit": "mocha --exit -r ts-node/register -r test/mocha.setup.js test/pure-tests/**/*.ts",
|
||||
"test:unit": "mocha --config .mocharc.json test/pure-tests/**/*.ts",
|
||||
"test:view": "jest",
|
||||
"preintegration": "rm -rf ./out/vscode-tests && gulp",
|
||||
"integration": "node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace",
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
const path = require('path');
|
||||
|
||||
require('ts-node').register({
|
||||
project: path.resolve(__dirname, 'tsconfig.json')
|
||||
})
|
||||
|
||||
process.env.TZ = 'UTC';
|
||||
process.env.LANG = 'en-US';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"extends": "../tsconfig.json",
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": [],
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user