Consistency

This commit is contained in:
Pine Wu
2019-05-28 09:48:12 +08:00
parent 9afa954a81
commit bc17f9e15f

View File

@ -5,8 +5,9 @@ import * as glob from 'glob';
export function run(testsRoot: string, cb: (error: any, failures?: number) => void): void {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
ui: 'tdd'
});
// Use any mocha API
mocha.useColors(true);
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
@ -20,7 +21,6 @@ export function run(testsRoot: string, cb: (error: any, failures?: number) => vo
try {
// Run the mocha test
mocha.run(failures => cb(null, failures));
} catch (err) {
cb(err);
}