Test that App Scan can read plist

This commit is contained in:
Sam Carlton 2022-07-16 18:37:42 -05:00
parent dc358ba5ac
commit 2a525d93d5
4 changed files with 377 additions and 44 deletions

View file

@ -1,44 +0,0 @@
import {
// assert,
expect,
test
} from 'vitest'
import { createApp } from 'vue'
// import {
// isString
// } from '~/helpers/check-types.js'
// const cases = [
// ]
function buildVueInstance () {
return createApp({
template: '<div>Hello World</div>',
data: function () {
return {
appsBeingScanned: []
}
},
})
}
test('Can initialize AppFilesScanner within Vite context', async () => {
const { default: AppFilesScanner } = await import('~/helpers/app-files-scanner.js')
const vueInstance:any = buildVueInstance()
const scanner = new AppFilesScanner({
observableFilesArray: vueInstance.appsBeingScanned,
testResultStore: global.$config.testResultStore
})
// Expect the scanner to be an instance of AppFilesScanner
expect( scanner ).toBeInstanceOf( AppFilesScanner )
})