about summary refs log tree commit diff
path: root/editors/code/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-10 14:22:21 +0000
committerbors <bors@rust-lang.org>2023-07-10 14:22:21 +0000
commit6f2e8aaba63a9f480c5fd2538fd02290821e4389 (patch)
treeecd03d738a3775eff3710801419bd1a29c696714 /editors/code/tests
parent2f6d545535acbedff0c338102be7f8a775602149 (diff)
parent444bc5b3ba366d2eab252e2c4f5c956a5e21df58 (diff)
downloadrust-6f2e8aaba63a9f480c5fd2538fd02290821e4389.tar.gz
rust-6f2e8aaba63a9f480c5fd2538fd02290821e4389.zip
Auto merge of #15252 - tetsuharuohzeki:enable-unknonw-catch, r=lnicola
editor/code: Enable TypeScript's `--useUnknownInCatchVariables` option

This enables TypeScript's [`--useUnknownInCatchVariables`](https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables).
Diffstat (limited to 'editors/code/tests')
-rw-r--r--editors/code/tests/unit/index.ts3
1 files changed, 3 insertions, 0 deletions
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;
         }