Test each app concurently

This commit is contained in:
Sam Carlton 2022-07-16 18:46:09 -05:00
parent 2a525d93d5
commit 33dbd93dec

View file

@ -1,10 +1,11 @@
import { import {
assert, describe,
expect, it,
test expect
} from 'vitest' } from 'vitest'
import path from 'node:path'
// https://github.com/mrmlnc/fast-glob // https://github.com/mrmlnc/fast-glob
import glob from 'fast-glob' import glob from 'fast-glob'
import { LocalFileData } from 'get-file-object-from-local-path' import { LocalFileData } from 'get-file-object-from-local-path'
@ -47,25 +48,36 @@ async function makeZipFromBundlePath ( bundlePath ) {
return archiveFile return archiveFile
} }
test('Can read info.plist for .app file', async () => {
describe.concurrent('Apps', () => {
// Compress plain app bundles to zipped File Objects // Compress plain app bundles to zipped File Objects
for ( const bundlePath of plainAppBundles ) { for ( const bundlePath of plainAppBundles ) {
// Create a new AppScan instance it( `Can read info.plist for ${ path.basename( bundlePath ) } bundle` , async () => {
const scan = new AppScan({
fileLoader: () => makeZipFromBundlePath( bundlePath ), // Compress plain app bundles to zipped File Objects
messageReceiver: ( details ) => { for ( const bundlePath of plainAppBundles ) {
console.log( 'Scan message:', details )
// Create a new AppScan instance
const scan = new AppScan({
fileLoader: () => makeZipFromBundlePath( bundlePath ),
messageReceiver: ( details ) => {
console.log( 'Scan message:', details )
}
})
// Scan the archive
await scan.start()
// console.log( 'infoPlist', scan.infoPlist )
expect( scan.hasInfoPlist ).toBe( true )
} }
}) })
// Scan the archive
await scan.start()
// console.log( 'infoPlist', scan.infoPlist )
expect( scan.hasInfoPlist ).toBe( true )
} }
}) })