]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: adjust test case type checking
authorEvan You <yyx990803@gmail.com>
Tue, 4 Jun 2024 09:22:11 +0000 (17:22 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 4 Jun 2024 09:22:11 +0000 (17:22 +0800)
context: the type usage is incorrect and was previously ignored by ts-expect-error,
but with 3.5 the error happens at the call level so it is safer to just any it.

packages/router/__tests__/RouterLink.spec.ts

index e3d76b685c2089af85b9105713392dc2a984c45f..1b9b8c0f64af3b519fe686e54d9434fa87e68ce4 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * @jest-environment jsdom
  */
-import { RouterLink, RouterLinkProps } from '../src/RouterLink'
+import { RouterLink } from '../src/RouterLink'
 import {
   START_LOCATION_NORMALIZED,
   RouteQueryAndHash,
@@ -919,9 +919,8 @@ describe('RouterLink', () => {
         components: { RouterLink },
         name: 'AppLink',
 
-        // @ts-expect-error
         props: {
-          ...((RouterLink as any).props as RouterLinkProps),
+          ...(RouterLink as any).props,
           inactiveClass: String as PropType<string>,
         },