Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 49208ef

Browse files
committed
fix(types): add missing types for Vue Router
1 parent 56e0152 commit 49208ef

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import {EmitsOptions} from 'vue'
55
import {MountingOptions} from '@vue/test-utils'
66
import {StoreOptions} from 'vuex'
7+
import {RouteRecordRaw} from 'vue-router'
78
import {queries, EventType, BoundFunctions} from '@testing-library/dom'
89
// eslint-disable-next-line import/no-extraneous-dependencies
910
import {OptionsReceived as PrettyFormatOptions} from 'pretty-format'
@@ -33,7 +34,7 @@ type VueTestUtilsRenderOptions = Omit<
3334
>
3435
type VueTestingLibraryRenderOptions = {
3536
store?: StoreOptions<{}>
36-
// router?: ¿¿¿???
37+
routes?: RouteRecordRaw[]
3738
container?: Element
3839
baseElement?: Element
3940
}

‎types/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export function testOptions() {
8282
state: {count: 3},
8383
strict: true,
8484
},
85+
routes: [{path: '/', component: () => SomeComponent, name: 'route name'}],
8586
baseElement: document.createElement('div'),
8687
container: document.createElement('div'),
8788
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /