mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -05:00
fix: propagate top level thrown errors in WPT (#10932)
Previously top level errors were swallowed.
This commit is contained in:
parent
c7ed125590
commit
614dc1bce7
2 changed files with 10 additions and 6 deletions
|
@ -168,9 +168,13 @@ async function generateBundle(location: URL): Promise<string> {
|
|||
}
|
||||
}
|
||||
|
||||
return scriptContents.map(([url, contents]) =>
|
||||
`Deno.core.evalContext(${JSON.stringify(contents)}, ${
|
||||
return scriptContents.map(([url, contents]) => `
|
||||
(function() {
|
||||
const [_,err] = Deno.core.evalContext(${JSON.stringify(contents)}, ${
|
||||
JSON.stringify(url)
|
||||
});`
|
||||
).join("\n");
|
||||
});
|
||||
if (err !== null) {
|
||||
throw err?.thrown;
|
||||
}
|
||||
})();`).join("\n");
|
||||
}
|
||||
|
|
|
@ -18,5 +18,5 @@ window.add_completion_callback((_tests, harnessStatus) => {
|
|||
while (bytesWritten < data.byteLength) {
|
||||
bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten));
|
||||
}
|
||||
Deno.exit(0);
|
||||
Deno.exit(harnessStatus.status === 0 ? 0 : 1);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue