Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
unzipping the file using cypress

enter image description hereI need to unzip the file using 'unzipping' whereas I am using the below code to do the same but it is partially unzipping but it is throwing an Invalid path error (as path contains special character *).please help me to fix it

let path = 'cypress/downloads/'
let file = '910-00001.1-20220419-1843.zip'

describe('example unzip', () => {
  it(' test', () => {
    cy.task('unzipping', { path, file })
    })





//task code (Added it into plugins --> index.js)

const unzipping = require('./unzipping')

module.exports = (on, config) => {
    on('task', {
        'unzipping': unzipping.unzip,
    })
}

// ./unzipping file (created a file named unzipping.js inside plugin folder)

const decompress = require('decompress');

const unzip = ({ path, file }) => decompress(path + file, path + 'unzip/' + file.replace('.zip', ''))

module.exports = {
    unzip,
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

So, I tried all your code you gave above, and it worked perfectly.

The only thing I can think if is the contents of the zip is the problem. In my test I made a simple zip with two text files 1.txt and 2.txt, then running the test, found them in the folder /cypress/downloads/unzip/910-00001.1-20220419-1843.

I suggest you do the same with a dummy zip, if the code works then look at the contents of 910-00001.1-20220419-1843.zip.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda