We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc17dae commit fbefceaCopy full SHA for fbefcea
src/__tests__/stubs.js
@@ -1,18 +1,19 @@
1
import {render} from '@testing-library/vue'
2
import Stubs from './components/Stubs'
3
4
-test('Form contains search button', () => {
5
- const DirectiveMock = {
6
- template: '<p>fake template</p>',
+test('Stubs out a component', () => {
+ const CustomStub = {
+ template: '<p>stubbed template</p>',
7
}
8
9
const {getByText} = render(Stubs, {
10
global: {
11
stubs: {
12
- directive: DirectiveMock,
+ // "Directive" is the stubbed out component
13
+ Directive: CustomStub,
14
},
15
16
})
17
- getByText('fake template')
18
+ getByText('stubbed template')
19
0 commit comments