Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/tests/unit/index.ts')
| -rw-r--r-- | editors/code/tests/unit/index.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts index 2fa223bed4..8ad46546ab 100644 --- a/editors/code/tests/unit/index.ts +++ b/editors/code/tests/unit/index.ts @@ -1,3 +1,4 @@ +import * as assert from "node:assert/strict"; import { readdir } from "fs/promises"; import * as path from "path"; @@ -30,6 +31,7 @@ class Suite { await test.promise; ok(` ✔ ${test.name}`); } catch (e) { + assert.ok(e instanceof Error); error(` ✖︎ ${test.name}\n ${e.stack}`); failed += 1; } @@ -50,6 +52,7 @@ export class Context { await ctx.run(); ok(`✔ ${name}`); } catch (e) { + assert.ok(e instanceof Error); error(`✖︎ ${name}\n ${e.stack}`); throw e; } @@ -60,7 +63,7 @@ export async function run(): Promise<void> { const context = new Context(); const testFiles = (await readdir(path.resolve(__dirname))).filter((name) => - name.endsWith(".test.js") + name.endsWith(".test.js"), ); for (const testFile of testFiles) { try { |