@@ -28,7 +28,7 @@ describe("adm-zip", () => {
2828 ) ;
2929 } ) ;
3030
31- it ( "zip.extractAllToAsync()" , ( done ) => {
31+ it ( "zip.extractAllToAsync(destination, false, false, callback )" , ( done ) => {
3232 const zip = new Zip ( "./test/assets/ultra.zip" ) ;
3333 zip . extractAllToAsync ( destination , false , false , ( error ) => {
3434 const files = walk ( destination ) ;
@@ -45,6 +45,24 @@ describe("adm-zip", () => {
4545 done ( ) ;
4646 } ) ;
4747 } ) ;
48+
49+ it ( "zip.extractAllToAsync(destination, false, callback)" , ( done ) => {
50+ const zip = new Zip ( "./test/assets/ultra.zip" ) ;
51+ zip . extractAllToAsync ( destination , false , ( error ) => {
52+ const files = walk ( destination ) ;
53+ expect ( files . sort ( ) ) . to . deep . equal (
54+ [
55+ pth . normalize ( "./test/xxx/attributes_test/asd/New Text Document.txt" ) ,
56+ pth . normalize ( "./test/xxx/attributes_test/blank file.txt" ) ,
57+ pth . normalize ( "./test/xxx/attributes_test/New folder/hidden.txt" ) ,
58+ pth . normalize ( "./test/xxx/attributes_test/New folder/hidden_readonly.txt" ) ,
59+ pth . normalize ( "./test/xxx/attributes_test/New folder/readonly.txt" ) ,
60+ pth . normalize ( "./test/xxx/utes_test/New folder/somefile.txt" )
61+ ] . sort ( )
62+ ) ;
63+ done ( ) ;
64+ } ) ;
65+ } ) ;
4866
4967 it ( "zip pathTraversal" , ( ) => {
5068 const target = pth . join ( destination , "test" ) ;
0 commit comments