How to use the extract-zip.mockImplementationOnce function in extract-zip

To help you get started, we’ve selected a few extract-zip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron / fiddle / tests / renderer / binary-spec.ts View on Github external
it('handles an error in the zip file', async () => {
      const eDownload = require('electron-download');
      eDownload.mockImplementationOnce((_p: any, c: any) => c(undefined, '/fake/path'));

      const mockZip = require('extract-zip');
      mockZip.mockImplementationOnce((_a: any, _b: any, c: any) => c(new Error('bwap-bwap')));

      await binaryManager.setup('v3.0.0');
    });
  });

extract-zip

unzip a zip file into a directory using 100% javascript

BSD-2-Clause
Latest version published 4 years ago

Package Health Score

80 / 100
Full package analysis

Popular extract-zip functions