diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-12 21:55:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 15:55:05 -0400 |
commit | 46b1c653c0c433932908b7610f60b409af134c76 (patch) | |
tree | 00d8b59c8c4e9b90538d548ebd828d2b3f94d4fd /cli/tests/unit/dispatch_bin_test.ts | |
parent | a20504642d083172f297543f9788b128e9c2e0bc (diff) |
refactor(deno): remove concept of bin & json ops (#10145)
Diffstat (limited to 'cli/tests/unit/dispatch_bin_test.ts')
-rw-r--r-- | cli/tests/unit/dispatch_bin_test.ts | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/cli/tests/unit/dispatch_bin_test.ts b/cli/tests/unit/dispatch_bin_test.ts deleted file mode 100644 index 01f29d0bc..000000000 --- a/cli/tests/unit/dispatch_bin_test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { assertStringIncludes, unitTest, unreachable } from "./test_util.ts"; - -unitTest(async function sendAsyncStackTrace() { - const buf = new Uint8Array(10); - const rid = 10; - try { - await Deno.read(rid, buf); - unreachable(); - } catch (error) { - const s = error.stack.toString(); - console.log(s); - assertStringIncludes(s, "dispatch_bin_test.ts"); - assertStringIncludes(s, "read"); - } -}); - -declare global { - namespace Deno { - // deno-lint-ignore no-explicit-any - var core: any; // eslint-disable-line no-var - } -} - -unitTest(async function binOpsAsyncBadResource(): Promise<void> { - try { - const nonExistingRid = 9999; - await Deno.core.binOpAsync( - "op_read_async", - nonExistingRid, - new Uint8Array(0), - ); - } catch (e) { - if (!(e instanceof Deno.errors.BadResource)) { - throw e; - } - } -}); - -unitTest(function binOpsSyncBadResource(): void { - try { - const nonExistingRid = 9999; - Deno.core.binOpSync("op_read_sync", nonExistingRid, new Uint8Array(0)); - } catch (e) { - if (!(e instanceof Deno.errors.BadResource)) { - throw e; - } - } -}); |