diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-01-22 02:21:45 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-21 21:51:45 +0100 |
| commit | 1b9f0cb452e672c187233de23cd74c7f8a3f773b (patch) | |
| tree | 5221271f4461a4e8c51f47947b8646ac8d3fddee /cli/tests/unit | |
| parent | 692738232b0668c35fcc572cb651fe543a8b87f9 (diff) | |
chore: add types for `Deno.UnsafeWindowSurface` (#22010)
Diffstat (limited to 'cli/tests/unit')
| -rw-r--r-- | cli/tests/unit/webgpu_test.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/tests/unit/webgpu_test.ts b/cli/tests/unit/webgpu_test.ts index 7ac88dd80..b204c5e0b 100644 --- a/cli/tests/unit/webgpu_test.ts +++ b/cli/tests/unit/webgpu_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, assertThrows } from "./test_util.ts"; let isCI: boolean; try { @@ -227,6 +227,15 @@ Deno.test({ Deno.close(Number(resources[resources.length - 1])); }); +Deno.test(function webgpuNullWindowSurfaceThrows() { + assertThrows( + () => { + // @ts-expect-error: runtime test for null handle + new Deno.UnsafeWindowSurface("cocoa", null, null); + }, + ); +}); + async function checkIsWsl() { return Deno.build.os === "linux" && await hasMicrosoftProcVersion(); |
