File tree 1 file changed +11
-15
lines changed
1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change 1
- test . todo ( 'Your test suite must contain at least one test.' )
1
+ import '@testing-library/jest-dom'
2
+ import { render } from '..'
2
3
3
- // import '@testing-library/jest-dom'
4
- // import {render} from '..'
4
+ import About from './components/Router/About.vue'
5
5
6
- // import About from './components/Router/About.vue'
6
+ const routes = [ ]
7
+ test ( 'uses require("vue-router").default when require("vue-router") is undefined (useful for mocha users)' , ( ) => {
8
+ // Test for fix https://github.com/testing-library/vue-testing-library/issues/119
9
+ jest . mock ( 'vue-router' , ( ) => undefined )
7
10
8
- // const routes = []
9
- // test('uses require("vue-router").default when require("vue-router") is undefined (useful for mocha users)', () => {
10
- // // Test for fix https://github.com/testing-library/vue-testing-library/issues/119
11
- // jest.mock('vue-router', () => {
12
- // return undefined
13
- // })
14
-
15
- // expect(() => render(About, {routes})).toThrowError(
16
- // new TypeError("Cannot read property 'default' of undefined"),
17
- // )
18
- // })
11
+ expect ( ( ) => render ( About , { routes} ) ) . toThrowError (
12
+ new TypeError ( "Cannot read property 'default' of undefined" ) ,
13
+ )
14
+ } )
You can’t perform that action at this time.
0 commit comments