Skip to content

Commit 3abe9eb

Browse files
committed
Fix Mocha TypeScript errors that appeared out of nowhere.
[Tests]
1 parent 810996e commit 3abe9eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/suite/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
2-
import * as Mocha from 'mocha';
3-
import * as glob from 'glob';
2+
import Mocha from 'mocha';
3+
import glob from 'glob';
44

55
export function run(): Promise<void> {
66
const mocha = new Mocha({
@@ -9,14 +9,14 @@ export function run(): Promise<void> {
99
});
1010
const testsRoot = path.resolve(__dirname, '..');
1111
return new Promise((resolve, reject) => {
12-
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
12+
glob('**/**.test.js', { cwd: testsRoot }, (err: Error | null, files: string[]) => {
1313
if (err) {
1414
return reject(err);
1515
}
16-
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
16+
files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f)));
1717
try {
1818
// Run the mocha test
19-
mocha.run(failures => {
19+
mocha.run((failures: number) => {
2020
if (failures > 0) {
2121
reject(new Error(`${failures} tests failed.`));
2222
} else {

0 commit comments

Comments
 (0)