Skip to content

Commit 855e670

Browse files
committed
Update debug
1 parent 850cb0e commit 855e670

File tree

1 file changed

+5
-4
lines changed
  • docs/vue-testing-library

1 file changed

+5
-4
lines changed

docs/vue-testing-library/api.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It also exposes these methods:
1616
- [`...queries`](#queries)
1717
- [`container`](#container)
1818
- [`baseElement`](#baseelement)
19-
- [`debug()`](#debug)
19+
- [`debug(element)`](#debugelement)
2020
- [`unmount()`](#unmount)
2121
- [`isUnmounted()`](#isunmounted)
2222
- [`html()`](#html)
@@ -116,11 +116,12 @@ children.
116116
117117
#### `baseElement`
118118

119-
Returns `document.body`, the DOM node where your Vue component is rendered.
119+
#### `debug(element)`
120120

121-
#### `debug()`
121+
This method is a shortcut for `console.log(prettyDOM(element))`.
122122

123-
This method is a shortcut for `console.log(prettyDOM(baseElement))`.
123+
`element` can either be a DOM element or an array containing DOM elements. It
124+
defaults to `baseElement`
124125

125126
```jsx
126127
import { render } from '@testing-library/vue'

0 commit comments

Comments
 (0)