@@ -24,6 +24,7 @@ test('extract file', async t => {
2424 const tarFiles = await m ( path . join ( __dirname , 'fixtures' , 'file.tar' ) ) ;
2525 const tarbzFiles = await m ( path . join ( __dirname , 'fixtures' , 'file.tar.bz2' ) ) ;
2626 const targzFiles = await m ( path . join ( __dirname , 'fixtures' , 'file.tar.gz' ) ) ;
27+ const tarzstFiles = await m ( path . join ( __dirname , 'fixtures' , 'file.tar.zst' ) ) ;
2728 const zipFiles = await m ( path . join ( __dirname , 'fixtures' , 'file.zip' ) ) ;
2829
2930 t . is ( tarFiles [ 0 ] . path , 'test.jpg' ) ;
@@ -32,6 +33,8 @@ test('extract file', async t => {
3233 t . true ( isJpg ( tarbzFiles [ 0 ] . data ) ) ;
3334 t . is ( targzFiles [ 0 ] . path , 'test.jpg' ) ;
3435 t . true ( isJpg ( targzFiles [ 0 ] . data ) ) ;
36+ t . is ( tarzstFiles [ 0 ] . path , 'test.jpg' ) ;
37+ t . true ( isJpg ( tarzstFiles [ 0 ] . data ) ) ;
3538 t . is ( zipFiles [ 0 ] . path , 'test.jpg' ) ;
3639 t . true ( isJpg ( zipFiles [ 0 ] . data ) ) ;
3740} ) ;
@@ -43,12 +46,15 @@ test('extract file using buffer', async t => {
4346 const tarbzFiles = await m ( tarbzBuf ) ;
4447 const targzBuf = await fsP . readFile ( path . join ( __dirname , 'fixtures' , 'file.tar.gz' ) ) ;
4548 const targzFiles = await m ( targzBuf ) ;
49+ const tarzstBuf = await fsP . readFile ( path . join ( __dirname , 'fixtures' , 'file.tar.zst' ) ) ;
50+ const tarzstFiles = await m ( tarzstBuf ) ;
4651 const zipBuf = await fsP . readFile ( path . join ( __dirname , 'fixtures' , 'file.zip' ) ) ;
4752 const zipFiles = await m ( zipBuf ) ;
4853
4954 t . is ( tarFiles [ 0 ] . path , 'test.jpg' ) ;
5055 t . is ( tarbzFiles [ 0 ] . path , 'test.jpg' ) ;
5156 t . is ( targzFiles [ 0 ] . path , 'test.jpg' ) ;
57+ t . is ( tarzstFiles [ 0 ] . path , 'test.jpg' ) ;
5258 t . is ( zipFiles [ 0 ] . path , 'test.jpg' ) ;
5359} ) ;
5460
0 commit comments