mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-02-01 17:36:51 +00:00
feat(ui): sort items by file name (#5652)
This commit is contained in:
parent
bdce0a29db
commit
1f7268fa76
@ -42,9 +42,13 @@ export const client = (function createVitestClient() {
|
||||
}
|
||||
})()
|
||||
|
||||
function sort(a: File, b: File) {
|
||||
return a.name.localeCompare(b.name)
|
||||
}
|
||||
|
||||
export const config = shallowRef<ResolvedConfig>({} as any)
|
||||
export const status = ref<WebSocketStatus>('CONNECTING')
|
||||
export const files = computed(() => client.state.getFiles())
|
||||
export const files = computed(() => client.state.getFiles().sort(sort))
|
||||
export const current = computed(() => files.value.find(file => file.id === activeFileId.value))
|
||||
export const currentLogs = computed(() => getTasks(current.value).map(i => i?.logs || []).flat() || [])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user