From c41a10c29331127ee830badddae55f3e27c9a6ea Mon Sep 17 00:00:00 2001 From: vsrs Date: Thu, 21 May 2020 11:34:34 +0300 Subject: Apply suggestions from @Veetaha code review --- editors/code/tests/unit/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'editors/code/tests/unit') diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts index 1deb1c403..5165720b4 100644 --- a/editors/code/tests/unit/index.ts +++ b/editors/code/tests/unit/index.ts @@ -11,10 +11,10 @@ export function run(): Promise { const testsRoot = __dirname; - return new Promise((c, e) => { + return new Promise((resolve, reject) => { glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { if (err) { - return e(err); + return reject(err); } // Add files to the test suite @@ -25,13 +25,13 @@ export function run(): Promise { mocha.timeout(100000); mocha.run(failures => { if (failures > 0) { - e(new Error(`${failures} tests failed.`)); + reject(new Error(`${failures} tests failed.`)); } else { - c(); + resolve(); } }); } catch (err) { - e(err); + reject(err); } }); }); -- cgit v1.2.3