diff options
Diffstat (limited to 'cli/tests/unit/dispatch_json_test.ts')
-rw-r--r-- | cli/tests/unit/dispatch_json_test.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cli/tests/unit/dispatch_json_test.ts b/cli/tests/unit/dispatch_json_test.ts index 51c33befd..ebb8217e3 100644 --- a/cli/tests/unit/dispatch_json_test.ts +++ b/cli/tests/unit/dispatch_json_test.ts @@ -19,14 +19,19 @@ unitTest( } ); +/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/no-explicit-any,no-var */ +declare global { + namespace Deno { + var core: any; + } +} +/* eslint-enable */ + unitTest(function malformedJsonControlBuffer(): void { - // @ts-expect-error const opId = Deno.core.ops()["op_open"]; - // @ts-expect-error const res = Deno.core.send(opId, new Uint8Array([1, 2, 3, 4, 5])); const resText = new TextDecoder().decode(res); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const resJson = JSON.parse(resText) as any; + const resJson = JSON.parse(resText); assert(!resJson.ok); assert(resJson.err); }); |