diff --git a/docs/config/index.md b/docs/config/index.md index 5749c8af7..26f052934 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -2297,6 +2297,10 @@ Should `location` property be included when Vitest API receives tasks in [report The `location` property has `column` and `line` values that correspond to the `test` or `describe` position in the original file. +This option will be auto-enabled if you don't disable it explicitly, and you are running Vitest with: +- [Vitest UI](/guide/ui) +- or using the [Browser Mode](/guide/browser) without [headless](/guide/browser#headless) mode + ::: tip This option has no effect if you do not use custom code that relies on this. ::: diff --git a/packages/ui/client/auto-imports.d.ts b/packages/ui/client/auto-imports.d.ts index b9f6880e6..34c081840 100644 --- a/packages/ui/client/auto-imports.d.ts +++ b/packages/ui/client/auto-imports.d.ts @@ -10,6 +10,7 @@ declare global { const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const calcExternalLabels: typeof import('./composables/module-graph')['calcExternalLabels'] + const codemirrorRef: typeof import('./composables/codemirror')['codemirrorRef'] const computed: typeof import('vue')['computed'] const computedAsync: typeof import('@vueuse/core')['computedAsync'] const computedEager: typeof import('@vueuse/core')['computedEager'] @@ -61,8 +62,10 @@ declare global { const isReactive: typeof import('vue')['isReactive'] const isReadonly: typeof import('vue')['isReadonly'] const isRef: typeof import('vue')['isRef'] + const lineNumber: typeof import('./composables/params')['lineNumber'] const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] const markRaw: typeof import('vue')['markRaw'] + const navigateTo: typeof import('./composables/navigation')['navigateTo'] const nextTick: typeof import('vue')['nextTick'] const onActivated: typeof import('vue')['onActivated'] const onBeforeMount: typeof import('vue')['onBeforeMount'] @@ -117,6 +120,8 @@ declare global { const shouldOpenInEditor: typeof import('./composables/error')['shouldOpenInEditor'] const showCoverage: typeof import('./composables/navigation')['showCoverage'] const showDashboard: typeof import('./composables/navigation')['showDashboard'] + const showLine: typeof import('./composables/codemirror')['showLine'] + const showSource: typeof import('./composables/codemirror')['showSource'] const syncRef: typeof import('@vueuse/core')['syncRef'] const syncRefs: typeof import('@vueuse/core')['syncRefs'] const templateRef: typeof import('@vueuse/core')['templateRef'] diff --git a/packages/ui/client/components.d.ts b/packages/ui/client/components.d.ts index de49b1ec7..a7a4abf43 100644 --- a/packages/ui/client/components.d.ts +++ b/packages/ui/client/components.d.ts @@ -8,7 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { BrowserIframe: typeof import('./components/BrowserIframe.vue')['default'] - CodeMirror: typeof import('./components/CodeMirror.vue')['default'] + CodeMirrorContainer: typeof import('./components/CodeMirrorContainer.vue')['default'] ConnectionOverlay: typeof import('./components/ConnectionOverlay.vue')['default'] Coverage: typeof import('./components/Coverage.vue')['default'] Dashboard: typeof import('./components/Dashboard.vue')['default'] diff --git a/packages/ui/client/components/CodeMirror.vue b/packages/ui/client/components/CodeMirrorContainer.vue similarity index 75% rename from packages/ui/client/components/CodeMirror.vue rename to packages/ui/client/components/CodeMirrorContainer.vue index d76a3227c..83ee34dc4 100644 --- a/packages/ui/client/components/CodeMirror.vue +++ b/packages/ui/client/components/CodeMirrorContainer.vue @@ -1,5 +1,5 @@ diff --git a/packages/ui/client/components/FileDetails.vue b/packages/ui/client/components/FileDetails.vue index 9184b1978..5bfe490c5 100644 --- a/packages/ui/client/components/FileDetails.vue +++ b/packages/ui/client/components/FileDetails.vue @@ -174,7 +174,6 @@ debouncedWatch( Module Graph