From 444bc5b3ba366d2eab252e2c4f5c956a5e21df58 Mon Sep 17 00:00:00 2001 From: Tetsuharu Ohzeki Date: Mon, 10 Jul 2023 23:03:08 +0900 Subject: editor/code: Enable TypeScript's `--useUnknownInCatchVariables` option see: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables --- editors/code/tests/unit/index.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'editors/code/tests') diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts index 2fa223bed4a..c231927bb00 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; } -- cgit 1.4.1-3-g733a5