Skip to content

Commit 40ba658

Browse files
karatekaneenkazupon
authored andcommitted
Added async/await example (#1338)
Added example of using async/await on functions that are using Promises under the hood.
1 parent b0d3623 commit 40ba658

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/guides/getting-started.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ it('will time out', done => {
121121
})
122122
})
123123

124-
// the two following tests will work as expected
124+
// the three following tests will work as expected
125125
it('will catch the error using done', done => {
126126
Vue.config.errorHandler = done
127127
Vue.nextTick(() => {
@@ -135,6 +135,11 @@ it('will catch the error using a promise', () => {
135135
expect(true).toBe(false)
136136
})
137137
})
138+
139+
it('will catch the error using async/await', async () => {
140+
await Vue.nextTick()
141+
expect(true).toBe(false)
142+
})
138143
```
139144

140145
### What's Next

0 commit comments

Comments
 (0)