We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfecdfa commit baac4acCopy full SHA for baac4ac
tests/unit/MessageContainer.spec.js
@@ -3,6 +3,18 @@ import { mount } from '@vue/test-utils'
3
4
describe('MessageContainer', () => {
5
it('Wraps MessageDisplay component', () => {
6
- const wrapper = mount(MessageContainer)
+ const wrapper = mount(MessageContainer, {
7
+ global: {
8
+ stubs: {
9
+ MessageDisplay: {
10
+ template: '<p data-testid="message">Hello from the db!</p>'
11
+ }
12
13
14
+ })
15
+
16
+ const stubMessage = 'Hello from the db!'
17
+ const message = wrapper.find('[data-testid="message"]').text()
18
+ expect(message).toEqual(stubMessage)
19
})
20
0 commit comments