Skip to content

Commit 7fdea8a

Browse files
committed
Fix handle closing
1 parent ec3b91a commit 7fdea8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/zip.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { setupLogs } from '@zenfs/core/tests/logs.js';
55
import assert from 'node:assert/strict';
66
import { fstatSync, openSync, readFileSync, readSync } from 'node:fs';
77
import { open } from 'node:fs/promises';
8-
import { suite, test } from 'node:test';
8+
import { after, suite, test } from 'node:test';
99

1010
setupLogs();
1111

@@ -41,7 +41,7 @@ suite('Basic ZIP operations', () => {
4141
_runTests();
4242
});
4343

44-
await using handle = await open(import.meta.dirname + '/files/data.zip');
44+
const handle = await open(import.meta.dirname + '/files/data.zip');
4545

4646
suite('ZIP Streaming', () => {
4747
test('Configure', async () => {
@@ -73,3 +73,5 @@ suite('Custom data source', () => {
7373

7474
_runTests();
7575
});
76+
77+
after(async () => await handle.close());

0 commit comments

Comments
 (0)