0

I want to try to create a zip file using adm-zip in cypress but I am getting this error? It seems that cypress not recognize adm-zip function

Below are my code. I hope you can help me on error stated above.

import Utilities from "../../utilities/utilities" import AdmZip from 'adm-zip';

class CreateContentFunctions {

createZIP() {
    const packageName = Utilities.generatePackageName('test')
    let contentData;

    cy.fixture('test/test.fixture.json').then((json) => {
        contentData = json.contentData
        cy.writeFile("cypress/fixtures/test/created-assets/assets/test.json", contentData)
        let zip = new AdmZip();
          json.contentData.header.package_name = packageName
      zip.writeZip("cypress/fixtures/test/created-assets/" + packageName + ".zip");
    })
    

}

}

J.Cruz
  • 1

0 Answers0