From: Eduardo San Martin Morote Date: Mon, 16 May 2022 13:37:54 +0000 (+0200) Subject: chore: types in tests X-Git-Tag: v4.1.0~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a5c0f92f168ef046490505a4c47a89f079557fa;p=thirdparty%2Fvuejs%2Frouter.git chore: types in tests --- diff --git a/e2e/guards-instances/index.ts b/e2e/guards-instances/index.ts index 456d6c17..be04ce28 100644 --- a/e2e/guards-instances/index.ts +++ b/e2e/guards-instances/index.ts @@ -8,6 +8,7 @@ import { useRouter, } from '../../src' import { createApp, ref, reactive, defineComponent, computed } from 'vue' +import { isArray } from '../../src/utils' // override existing style on dev with shorter times if (!__CI__) { @@ -148,7 +149,9 @@ router.push = to => { }, }) } else { + // @ts-expect-error: because of the generics return originalPush({ + // @ts-expect-error: because of the generics ...to, query: { testCase: router.currentRoute.value.query.testCase, @@ -224,7 +227,7 @@ leaves: {{ state.leave }} const testCase = computed({ get: () => { let { testCase } = route.query - return !testCase || Array.isArray(testCase) ? '' : testCase + return !testCase || isArray(testCase) ? '' : testCase }, set(testCase) { router.push({ query: { ...route.query, testCase } })