Skip to content

Commit

Permalink
fix(ui): list tests on ui when --standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Sep 26, 2024
1 parent 445367b commit beb5abd
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/ui/client/composables/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,22 @@ watch(
ws.addEventListener('open', async () => {
status.value = 'OPEN'
client.state.filesMap.clear()
const [remoteFiles, _config, errors] = await Promise.all([
let [files, _config, errors] = await Promise.all([
client.rpc.getFiles(),
client.rpc.getConfig(),
client.rpc.getUnhandledErrors(),
])
if (_config.standalone) {
const filenames = await client.rpc.getTestFiles()
const files = filenames.map<File>(([{ name, root }, filepath]) => {
return /* #__PURE__ */ createFileTask(filepath, root, name)
files = filenames.map(([{ name, root }, filepath]) => {
const file = createFileTask(filepath, root, name)
file.mode = 'skip'
return file
})
client.state.collectFiles(files)
}
else {
explorerTree.loadFiles(remoteFiles)
client.state.collectFiles(remoteFiles)
explorerTree.startRun()
}
explorerTree.loadFiles(files)
client.state.collectFiles(files)
explorerTree.startRun()
unhandledErrors.value = (errors || []).map(parseError)
config.value = _config
})
Expand Down

0 comments on commit beb5abd

Please sign in to comment.