summaryrefslogtreecommitdiff
path: root/cli/tests/unit/opcall_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/opcall_test.ts')
-rw-r--r--cli/tests/unit/opcall_test.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts
index 61c3c8849..3f4f4472c 100644
--- a/cli/tests/unit/opcall_test.ts
+++ b/cli/tests/unit/opcall_test.ts
@@ -22,17 +22,13 @@ Deno.test(async function sendAsyncStackTrace() {
}
});
-declare global {
- namespace Deno {
- // deno-lint-ignore no-explicit-any, no-var
- var core: any;
- }
-}
+// @ts-ignore This is not publicly typed namespace, but it's there for sure.
+const core = Deno[Deno.internal].core;
Deno.test(async function opsAsyncBadResource() {
try {
const nonExistingRid = 9999;
- await Deno.core.read(
+ await core.read(
nonExistingRid,
new Uint8Array(0),
);
@@ -46,7 +42,10 @@ Deno.test(async function opsAsyncBadResource() {
Deno.test(function opsSyncBadResource() {
try {
const nonExistingRid = 9999;
- Deno.core.ops.op_read_sync(nonExistingRid, new Uint8Array(0));
+ core.ops.op_read_sync(
+ nonExistingRid,
+ new Uint8Array(0),
+ );
} catch (e) {
if (!(e instanceof Deno.errors.BadResource)) {
throw e;