mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Merge deno_cli_snapshots into deno_cli (#3064)
This commit is contained in:
parent
9049213867
commit
b81e5db17a
148 changed files with 38 additions and 83 deletions
19
cli/js/dispatch_json_test.ts
Normal file
19
cli/js/dispatch_json_test.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { testPerm, assertMatch, unreachable } from "./test_util.ts";
|
||||
|
||||
const openErrorStackPattern = new RegExp(
|
||||
`^.*
|
||||
at unwrapResponse \\(.*dispatch_json\\.ts:.*\\)
|
||||
at Object.sendAsync \\(.*dispatch_json\\.ts:.*\\)
|
||||
at async Object\\.open \\(.*files\\.ts:.*\\).*$`,
|
||||
"ms"
|
||||
);
|
||||
|
||||
testPerm({ read: true }, async function sendAsyncStackTrace(): Promise<void> {
|
||||
await Deno.open("nonexistent.txt")
|
||||
.then(unreachable)
|
||||
.catch(
|
||||
(error): void => {
|
||||
assertMatch(error.stack, openErrorStackPattern);
|
||||
}
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue