Skip to content

Commit 6039aed

Browse files
committed
Update adapter in test
1 parent 1c2a937 commit 6039aed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/utils/zipAdapter.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import os from 'os';
33
import path from 'path';
44
import AdmZip from 'adm-zip';
5-
import { openZipFromInput } from '../../src/utils/zip';
5+
import { getZipAdapter } from '../../src/utils/zip';
66

77
function createTempDir(prefix: string): string {
88
return fs.mkdtempSync(path.join(os.tmpdir(), prefix));
@@ -14,7 +14,7 @@ describe('zip adapter (Node)', () => {
1414
zip.addFile('foo.txt', Buffer.from('hello', 'utf8'));
1515

1616
const buffer = zip.toBuffer();
17-
const { zip: adapter } = await openZipFromInput(new Uint8Array(buffer));
17+
const adapter = await getZipAdapter(new Uint8Array(buffer));
1818

1919
expect(adapter.listFiles()).toContain('foo.txt');
2020
const contents = await adapter.readFile('foo.txt');
@@ -29,7 +29,7 @@ describe('zip adapter (Node)', () => {
2929
zip.addFile('bar.txt', Buffer.from('world', 'utf8'));
3030
zip.writeZip(zipPath);
3131

32-
const { zip: adapter } = await openZipFromInput(zipPath);
32+
const adapter = await getZipAdapter(zipPath);
3333
expect(adapter.listFiles()).toContain('bar.txt');
3434
const contents = await adapter.readFile('bar.txt');
3535
expect(Buffer.from(contents).toString('utf8')).toBe('world');

0 commit comments

Comments
 (0)