X Tutup
Skip to content

Commit f3bbf04

Browse files
committed
fix assert issue again
1 parent e71f819 commit f3bbf04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ end)());`;
491491
try {
492492
result = vm.runInContext(this.getJsCodeWithWrapper(), globalContext);
493493
} catch (error) {
494-
assert(error instanceof Error);
494+
const hasMessage = (error: any): error is { message: string } => error.message !== undefined;
495+
assert(hasMessage(error));
495496
return new ExecutionError(error.message);
496497
}
497498

0 commit comments

Comments
 (0)
X Tutup