11import type { Locator , LocatorSelectors , PrettyDOMOptions } from 'vitest/browser'
22import { page , server , utils } from 'vitest/browser'
3- import { type ComponentMountingOptions , type VueWrapper , mount } from '@vue/test-utils'
3+ import { type ComponentMountingOptions , type VueWrapper , mount , config as vtuConfig } from '@vue/test-utils'
44import { type Component , type DefineComponent , defineComponent , h , nextTick , reactive } from 'vue'
55
66export { config } from '@vue/test-utils'
@@ -15,6 +15,35 @@ export interface RenderConfiguration {
1515
1616const renderConfig : RenderConfiguration = { }
1717
18+ export interface ConfigureOptions {
19+ /**
20+ * Configure vitest-browser-vue render behavior globally.
21+ * This is equivalent to calling {@link configureRender}.
22+ */
23+ render ?: Partial < RenderConfiguration >
24+ /**
25+ * Configure Vue Test Utils global config (`config.global`).
26+ *
27+ * This is a shallow merge into `@vue/test-utils` config.
28+ */
29+ vtu ?: Partial < ( typeof vtuConfig ) [ 'global' ] >
30+ }
31+
32+ /**
33+ * Configure test utilities in one call.
34+ *
35+ * - `render`: vitest-browser-vue render configuration (e.g. global wrapper)
36+ * - `vtu`: Vue Test Utils global config (`config.global`)
37+ */
38+ export function configure ( options : ConfigureOptions ) : void {
39+ if ( options . render ) {
40+ configureRender ( options . render )
41+ }
42+ if ( options . vtu ) {
43+ Object . assign ( vtuConfig . global , options . vtu )
44+ }
45+ }
46+
1847/**
1948 * Configure vitest-browser-vue options globally.
2049 *
0 commit comments