From 49208ef25af03e19e5245ef592a04825e402cf29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Fontcuberta?= Date: Mon, 14 Dec 2020 00:12:58 +0100 Subject: [PATCH] fix(types): add missing types for Vue Router --- types/index.d.ts | 3 ++- types/test.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 5dec7fa4..c886447a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -4,6 +4,7 @@ import {EmitsOptions} from 'vue' import {MountingOptions} from '@vue/test-utils' import {StoreOptions} from 'vuex' +import {RouteRecordRaw} from 'vue-router' import {queries, EventType, BoundFunctions} from '@testing-library/dom' // eslint-disable-next-line import/no-extraneous-dependencies import {OptionsReceived as PrettyFormatOptions} from 'pretty-format' @@ -33,7 +34,7 @@ type VueTestUtilsRenderOptions = Omit< > type VueTestingLibraryRenderOptions = { store?: StoreOptions<{}> - // router?: ¿¿¿??? + routes?: RouteRecordRaw[] container?: Element baseElement?: Element } diff --git a/types/test.ts b/types/test.ts index b11b466b..aeb5df89 100644 --- a/types/test.ts +++ b/types/test.ts @@ -82,6 +82,7 @@ export function testOptions() { state: {count: 3}, strict: true, }, + routes: [{path: '/', component: () => SomeComponent, name: 'route name'}], baseElement: document.createElement('div'), container: document.createElement('div'), })