summaryrefslogtreecommitdiff
path: root/cli/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit')
-rw-r--r--cli/tests/unit/ffi_test.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/tests/unit/ffi_test.ts b/cli/tests/unit/ffi_test.ts
index 690b37afc..65b257774 100644
--- a/cli/tests/unit/ffi_test.ts
+++ b/cli/tests/unit/ffi_test.ts
@@ -29,7 +29,8 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() {
Deno.dlopen("/usr/lib/libc.so.6", {});
}, Deno.errors.PermissionDenied);
const fnptr = new Deno.UnsafeFnPointer(
- 0n,
+ // @ts-expect-error: Not NonNullable but null check is after premissions check.
+ null,
{
parameters: ["u32", "pointer"],
result: "void",
@@ -41,7 +42,10 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() {
assertThrows(() => {
Deno.UnsafePointer.of(new Uint8Array(0));
}, Deno.errors.PermissionDenied);
- const ptrView = new Deno.UnsafePointerView(0n);
+ const ptrView = new Deno.UnsafePointerView(
+ // @ts-expect-error: Not NonNullable but null check is after premissions check.
+ null,
+ );
assertThrows(() => {
ptrView.copyInto(new Uint8Array(0));
}, Deno.errors.PermissionDenied);