aboutsummaryrefslogtreecommitdiff
path: root/editors/code/tests/unit/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/tests/unit/index.ts')
-rw-r--r--editors/code/tests/unit/index.ts10
1 files changed, 5 insertions, 5 deletions
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<void> {
11 11
12 const testsRoot = __dirname; 12 const testsRoot = __dirname;
13 13
14 return new Promise((c, e) => { 14 return new Promise((resolve, reject) => {
15 glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { 15 glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
16 if (err) { 16 if (err) {
17 return e(err); 17 return reject(err);
18 } 18 }
19 19
20 // Add files to the test suite 20 // Add files to the test suite
@@ -25,13 +25,13 @@ export function run(): Promise<void> {
25 mocha.timeout(100000); 25 mocha.timeout(100000);
26 mocha.run(failures => { 26 mocha.run(failures => {
27 if (failures > 0) { 27 if (failures > 0) {
28 e(new Error(`${failures} tests failed.`)); 28 reject(new Error(`${failures} tests failed.`));
29 } else { 29 } else {
30 c(); 30 resolve();
31 } 31 }
32 }); 32 });
33 } catch (err) { 33 } catch (err) {
34 e(err); 34 reject(err);
35 } 35 }
36 }); 36 });
37 }); 37 });