Skip to content

Commit c803501

Browse files
committed
Comment out potential deprecated test
1 parent ad4c1b4 commit c803501

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

src/__tests__/cleanup-throw.js

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
import {render, cleanup} from '@testing-library/vue'
2-
import Vue from 'vue'
1+
test.todo('check if this test still makes sense')
32

4-
test('cleanup re-throws errors from async lifecycle hooks', async () => {
5-
const err = new Error('foo')
6-
render({
7-
async mounted() {
8-
await new Promise((resolve, reject) => reject(err))
9-
},
10-
template: `<h1>Hello World</h1>`,
11-
})
12-
// thrown errors are logged redundantly by vue-test-utils injected Vue.config.errorHandler
13-
// mute console
14-
const spy = jest.spyOn(console, 'error').mockImplementation(() => {})
3+
// import {render, cleanup} from '@testing-library/vue'
4+
// import {nextTick} from 'vue'
155

16-
await Vue.nextTick()
17-
expect(cleanup).toThrow(err)
6+
// test('cleanup re-throws errors from async lifecycle hooks', async () => {
7+
// const err = new Error('foo')
8+
// render({
9+
// async mounted() {
10+
// await new Promise((_, reject) => reject(err))
11+
// },
12+
// template: `<h1>Hello World</h1>`,
13+
// })
14+
// // thrown errors are logged redundantly by vue-test-utils injected Vue.config.errorHandler
15+
// // mute console
16+
// const spy = jest.spyOn(console, 'error').mockImplementation(() => {})
1817

19-
// unmute console
20-
spy.mockReset()
21-
})
18+
// await nextTick()
19+
// expect(cleanup).toThrow(err)
20+
21+
// // unmute console
22+
// spy.mockReset()
23+
// })

0 commit comments

Comments
 (0)