Skip to content

Commit 8034c49

Browse files
committed
Pass the router as a plugin during testing
1 parent 0f126f2 commit 8034c49

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/router/__tests__/useLink.spec.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import { mockWarn } from 'jest-mock-warn'
77
import {
88
createMemoryHistory,
99
createRouter,
10-
routeLocationKey,
1110
RouteLocationRaw,
12-
routerKey,
1311
useLink,
1412
UseLinkOptions,
1513
} from '../src'
@@ -50,10 +48,7 @@ async function callUseLink(args: UseLinkOptions) {
5048
},
5149
{
5250
global: {
53-
provide: {
54-
[routerKey as any]: router,
55-
[routeLocationKey as any]: router.currentRoute.value,
56-
},
51+
plugins: [router],
5752
},
5853
}
5954
)

0 commit comments

Comments
 (0)