Skip to content

Commit fbefcea

Browse files
committed
Fix failing stubs tests
1 parent fc17dae commit fbefcea

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/__tests__/stubs.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import {render} from '@testing-library/vue'
22
import Stubs from './components/Stubs'
33

4-
test('Form contains search button', () => {
5-
const DirectiveMock = {
6-
template: '<p>fake template</p>',
4+
test('Stubs out a component', () => {
5+
const CustomStub = {
6+
template: '<p>stubbed template</p>',
77
}
88

99
const {getByText} = render(Stubs, {
1010
global: {
1111
stubs: {
12-
directive: DirectiveMock,
12+
// "Directive" is the stubbed out component
13+
Directive: CustomStub,
1314
},
1415
},
1516
})
1617

17-
getByText('fake template')
18+
getByText('stubbed template')
1819
})

0 commit comments

Comments
 (0)