We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e71f819 commit f3bbf04Copy full SHA for f3bbf04
test/util.ts
@@ -491,7 +491,8 @@ end)());`;
491
try {
492
result = vm.runInContext(this.getJsCodeWithWrapper(), globalContext);
493
} catch (error) {
494
- assert(error instanceof Error);
+ const hasMessage = (error: any): error is { message: string } => error.message !== undefined;
495
+ assert(hasMessage(error));
496
return new ExecutionError(error.message);
497
}
498
0 commit comments