diff --git a/test/scanner/client.test.js b/test/scanner/client.test.js index 4d84a0e..17b4ad5 100644 --- a/test/scanner/client.test.js +++ b/test/scanner/client.test.js @@ -5,6 +5,7 @@ import { expect } from 'vitest' +import fs from 'fs-extra' import path from 'node:path' // https://github.com/mrmlnc/fast-glob import glob from 'fast-glob' @@ -41,6 +42,12 @@ const plainAppBundles = glob async function makeZipFromBundlePath ( bundlePath ) { const archivePath = `${ tempPath }/${ bundlePath.split('/').pop() }.zip` + // Delete any existing archive + if ( await fs.exists( archivePath ) ) { + console.log( 'Deleting existing archive', archivePath ) + await fs.unlink( archivePath ) + } + // console.log( 'archivePath', archivePath ) const zipLib = new Zip()