diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-01-23 19:45:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 15:15:40 +0100 |
commit | ebe4c1421e13e61295221982900ac5b77c848227 (patch) | |
tree | 3e2a9de57eda020d97d10a77c68e85c540bf43c9 /cli/tests | |
parent | d6d437c4dce9beb6b304c481812e65d6751cbeb7 (diff) |
chore: use ensureFastOps in 02_surface.js (#22045)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/webgpu_test.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cli/tests/unit/webgpu_test.ts b/cli/tests/unit/webgpu_test.ts index b204c5e0b..fcbb34be5 100644 --- a/cli/tests/unit/webgpu_test.ts +++ b/cli/tests/unit/webgpu_test.ts @@ -227,13 +227,25 @@ Deno.test({ Deno.close(Number(resources[resources.length - 1])); }); -Deno.test(function webgpuNullWindowSurfaceThrows() { +Deno.test({ + ignore: isWsl || isLinuxOrMacCI, +}, async function webgpuNullWindowSurfaceThrows() { + const adapter = await navigator.gpu.requestAdapter(); + assert(adapter); + + const device = await adapter.requestDevice(); + assert(device); + assertThrows( () => { // @ts-expect-error: runtime test for null handle new Deno.UnsafeWindowSurface("cocoa", null, null); }, ); + + device.destroy(); + const resources = Object.keys(Deno.resources()); + Deno.close(Number(resources[resources.length - 1])); }); async function checkIsWsl() { |