Skip to content

Commit 9a07733

Browse files
committed
docs: fix example formatting
1 parent 2e6f72b commit 9a07733

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

packages/docs/src/pages/en/getting-started/unit-testing.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -119,34 +119,34 @@ When testing Vuetify components, we recommend running tests in a real browser en
119119
To properly render Vuetify components in tests, create a Vuetify instance and pass it to the test renderer. You don’t need to mock transitions or other internals.
120120

121121
```ts { resource="vuetify/packages/vuetify/test/index.ts" }
122-
export function render<C> (
123-
component: C,
124-
options?: RenderOptions<C> | null,
125-
vuetifyOptions?: VuetifyOptions
126-
): RenderResult {
127-
const vuetify = createVuetify(mergeDeep({ icons: { aliases } }, vuetifyOptions))
128-
129-
const defaultOptions = {
130-
global: {
131-
stubs: {
132-
transition: false,
133-
'transition-group': false,
134-
},
135-
plugins: [vuetify],
136-
},
137-
}
138-
139-
const mountOptions = mergeDeep(defaultOptions, options!, (a, b) => a.concat(b))
140-
141-
return _render(component, mountOptions)
122+
export function render<C> (
123+
component: C,
124+
options?: RenderOptions<C> | null,
125+
vuetifyOptions?: VuetifyOptions
126+
): RenderResult {
127+
const vuetify = createVuetify(mergeDeep({ icons: { aliases } }, vuetifyOptions))
128+
129+
const defaultOptions = {
130+
global: {
131+
stubs: {
132+
transition: false,
133+
'transition-group': false,
134+
},
135+
plugins: [vuetify],
136+
},
137+
}
138+
139+
const mountOptions = mergeDeep(defaultOptions, options!, (a, b) => a.concat(b))
140+
141+
return _render(component, mountOptions)
142142
}
143143
```
144144

145145
### Using `data-testid`
146146

147147
For reliable queries in tests, use `data-testid` attributes in your components:
148148

149-
```vue
149+
```html
150150
<v-btn data-testid="submit-btn">Submit</v-btn>
151151
```
152152

0 commit comments

Comments
 (0)