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