@@ -2,7 +2,7 @@ import fs from 'fs';
22import os from 'os' ;
33import path from 'path' ;
44import AdmZip from 'adm-zip' ;
5- import { openZipFromInput } from '../../src/utils/zip' ;
5+ import { getZipAdapter } from '../../src/utils/zip' ;
66
77function 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