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:
Koen Vlaswinkel
2022-10-28 16:34:36 +02:00
parent a9e49f2d72
commit c4d9ef26a8
5 changed files with 20 additions and 9 deletions

6
.vscode/launch.json vendored
View File

@@ -44,10 +44,8 @@
"bdd", "bdd",
"--colors", "--colors",
"--diff", "--diff",
"-r", "--config",
"ts-node/register", ".mocharc.json",
"-r",
"test/mocha.setup.js",
"test/pure-tests/**/*.ts" "test/pure-tests/**/*.ts"
], ],
"stopOnEntry": false, "stopOnEntry": false,

View File

@@ -0,0 +1,6 @@
{
"exit": true,
"require": [
"test/mocha.setup.js"
]
}

View File

@@ -1248,7 +1248,7 @@
"watch:extension": "tsc --watch", "watch:extension": "tsc --watch",
"watch:webpack": "gulp watchView", "watch:webpack": "gulp watchView",
"test": "npm-run-all -p test:*", "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", "test:view": "jest",
"preintegration": "rm -rf ./out/vscode-tests && gulp", "preintegration": "rm -rf ./out/vscode-tests && gulp",
"integration": "node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace", "integration": "node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace",

View File

@@ -1,2 +1,8 @@
const path = require('path');
require('ts-node').register({
project: path.resolve(__dirname, 'tsconfig.json')
})
process.env.TZ = 'UTC'; process.env.TZ = 'UTC';
process.env.LANG = 'en-US'; process.env.LANG = 'en-US';

View File

@@ -1,8 +1,9 @@
{ {
"include": [ "extends": "../tsconfig.json",
"**/*.ts" "include": ["**/*.ts"],
], "exclude": [],
"compilerOptions": { "compilerOptions": {
"noEmit": true "noEmit": true,
"resolveJsonModule": true
} }
} }