Skip to content

Commit 1a16aa2

Browse files
lex111sdras
authored andcommitted
Fix example indentation in the Unit Testing Vue Components recipe (#1683)
1 parent aeebd0e commit 1a16aa2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/v2/cookbook/unit-testing-vue-components.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -149,22 +149,22 @@ import { shallowMount } from '@vue/test-utils'
149149

150150
describe('Foo', () => {
151151
it('renders a message and responds correctly to user input', () => {
152-
const wrapper = shallowMount(Foo, {
153-
data: {
154-
message: 'Hello World',
155-
username: ''
156-
}
157-
})
152+
const wrapper = shallowMount(Foo, {
153+
data: {
154+
message: 'Hello World',
155+
username: ''
156+
}
157+
})
158158

159-
// see if the message renders
160-
expect(wrapper.find('.message').text()).toEqual('Hello World')
159+
// see if the message renders
160+
expect(wrapper.find('.message').text()).toEqual('Hello World')
161161

162-
// assert the error is rendered
163-
expect(wrapper.find('.error').exists()).toBeTruthy()
162+
// assert the error is rendered
163+
expect(wrapper.find('.error').exists()).toBeTruthy()
164164

165-
// update the `username` and assert error is no longer rendered
166-
wrapper.setData({ username: 'Lachlan' })
167-
expect(wrapper.find('.error').exists()).toBeFalsy()
165+
// update the `username` and assert error is no longer rendered
166+
wrapper.setData({ username: 'Lachlan' })
167+
expect(wrapper.find('.error').exists()).toBeFalsy()
168168
})
169169
})
170170
```

0 commit comments

Comments
 (0)