MCPcopy
hub / github.com/vitest-dev/vitest / initializeNavigation

Function initializeNavigation

packages/ui/client/composables/navigation.ts:82–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80)
81
82export function initializeNavigation() {
83 const file = activeFileId.value
84 if (file && file.length > 0) {
85 const current = findById(file)
86 if (current) {
87 currentModule.value = current
88 dashboardVisible.value = false
89 coverageVisible.value = false
90 }
91 else {
92 watchOnce(
93 () => client.state.getFiles(),
94 () => {
95 currentModule.value = findById(file)
96 dashboardVisible.value = false
97 coverageVisible.value = false
98 },
99 )
100 }
101 }
102
103 return dashboardVisible
104}
105
106export function showDashboard(show: boolean) {
107 dashboardVisible.value = show

Callers

nothing calls this directly

Calls 2

findByIdFunction · 0.90
getFilesMethod · 0.45

Tested by

no test coverage detected