summaryrefslogtreecommitdiff
path: root/cli/tests/unit/opcall_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/opcall_test.ts')
-rw-r--r--cli/tests/unit/opcall_test.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts
index 7e3685320..e38f481d9 100644
--- a/cli/tests/unit/opcall_test.ts
+++ b/cli/tests/unit/opcall_test.ts
@@ -12,7 +12,9 @@ unitTest(async function sendAsyncStackTrace() {
await Deno.read(rid, buf);
unreachable();
} catch (error) {
- const s = error.stack.toString();
+ assert(error instanceof Error);
+ const s = error.stack?.toString();
+ assert(s);
console.log(s);
assertStringIncludes(s, "opcall_test.ts");
assertStringIncludes(s, "read");