Skip to content

Commit 0c571b1

Browse files
authored
Fix mocha test running (#600)
PR #591 broke the build.
1 parent 7e4491a commit 0c571b1

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

extensions/ql-vscode/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@
685685
"@types/gulp-sourcemaps": "0.0.32",
686686
"@types/js-yaml": "~3.12.2",
687687
"@types/jszip": "~3.1.6",
688-
"@types/mocha": "~5.2.7",
688+
"@types/mocha": "~8.0.3",
689689
"@types/node": "^12.0.8",
690690
"@types/node-fetch": "~2.5.2",
691691
"@types/proxyquire": "~1.3.28",

extensions/ql-vscode/src/vscode-tests/index-template.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import * as glob from 'glob';
55
/**
66
* Helper function that runs all Mocha tests found in the
77
* given test root directory.
8-
*
8+
*
99
* For each integration test suite, `vscode-test` expects
1010
* a test runner script exporting a function with the signature:
1111
* ```ts
1212
* export function run(): Promise<void>
1313
* ```
14-
*
14+
*
1515
* To create an integration test suite:
1616
* - create a directory beside this file
1717
* - create integration tests in the directory, named `<name>.test.ts`
@@ -22,16 +22,16 @@ import * as glob from 'glob';
2222
* return runTestsInDirectory(__dirname);
2323
* }
2424
* ```
25-
*
25+
*
2626
* After https://github.com/microsoft/TypeScript/issues/420 is implemented,
2727
* this pattern can be expressed more neatly using a module interface.
2828
*/
2929
export function runTestsInDirectory(testsRoot: string): Promise<void> {
3030
// Create the mocha test
3131
const mocha = new Mocha({
32-
ui: 'bdd'
32+
ui: 'bdd',
33+
color: true
3334
});
34-
mocha.useColors(true);
3535

3636
return new Promise((c, e) => {
3737
console.log(`Adding test cases from ${testsRoot}`);

0 commit comments

Comments
 (0)