File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed
Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change 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+ // })
You can’t perform that action at this time.
0 commit comments