Skip to content

Commit

Permalink
chore: enable simulated tests for Deno 2 (#4556)
Browse files Browse the repository at this point in the history
* chore: add simulated tests for Deno 2

* tweak

* tweak
  • Loading branch information
iuioiua authored Apr 8, 2024
1 parent b7833b1 commit 60eb08b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ jobs:
with:
deno-version: ${{ matrix.deno }}

- name: Run tests canary
- name: Run tests
run: deno task test

- name: Run tests (simulate Deno 2)
if: matrix.deno == 'canary'
run: deno task test
env:
DENO_FUTURE: 1

- name: Run timezone-dependent tests
run: |
TZ=Australia/Sydney deno test datetime
Expand Down
4 changes: 2 additions & 2 deletions webgpu/_test_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function cleanUp(device: GPUDevice) {

// TODO(lucacasonato): webgpu spec should add a explicit destroy method for
// adapters.
// deno-lint-ignore no-deprecated-deno-api
const resources = Object.keys(Deno.resources());
// @ts-ignore Until WebGPU resources cleanup is automatically handled.
const resources = Object.keys(Deno[Deno.internal].core.resources());
// @ts-ignore Until WebGPU resources cleanup is automatically handled.
Deno[Deno.internal].core.close(Number(resources[resources.length - 1]));
}

0 comments on commit 60eb08b

Please sign in to comment.