diff --git a/test/app.js b/test/app.js index f707e38..98f7681 100644 --- a/test/app.js +++ b/test/app.js @@ -3,7 +3,7 @@ var JSZip = require('jszip'); let zip = new JSZip() new JSZip.external.Promise((resolve, reject)=>{ - fs.readFile('mythical_man_month__the__essays_on_software_engineering__anniversary_edition.zip', + fs.readFile('test/mythical_man_month__the__essays_on_software_engineering__anniversary_edition.zip', (err, data)=>{ if (err){ reject(err); @@ -13,10 +13,15 @@ new JSZip.external.Promise((resolve, reject)=>{ }) }) .then((data)=>{ - return JSZip.loadAsync(data) + return JSZip.loadAsync(data, { + checkCRC32: true + }) }) .then((zip)=>{ console.log(zip) + zip.folder('EPUB').forEach((fileName, _)=>{ + console.log(`${fileName}`) + }) }) .catch((reason)=>{ console.log(`Error: ${reason}`)