]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: types in tests
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 16 May 2022 13:37:54 +0000 (15:37 +0200)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Thu, 30 Jun 2022 07:59:00 +0000 (09:59 +0200)
e2e/guards-instances/index.ts

index 456d6c17d8ee60753ac7da78972d44338864a8d0..be04ce281cd4be97996a098aafc961d1d49a9dcf 100644 (file)
@@ -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<string>({
       get: () => {
         let { testCase } = route.query
-        return !testCase || Array.isArray(testCase) ? '' : testCase
+        return !testCase || isArray(testCase) ? '' : testCase
       },
       set(testCase) {
         router.push({ query: { ...route.query, testCase } })