mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-06 09:30:37 +02:00
39 lines
670 B
JavaScript
39 lines
670 B
JavaScript
const mockMatcher = {
|
|
routeConfig: [],
|
|
match: () => {},
|
|
getRoutes: () => {},
|
|
isActive: () => {},
|
|
format: () => {},
|
|
};
|
|
|
|
export const mockRouter = {
|
|
push: () => {},
|
|
replace: () => {},
|
|
go: () => {},
|
|
createHref: () => {},
|
|
createLocation: () => {},
|
|
addNavigationListener: () => {},
|
|
matcher: mockMatcher,
|
|
replaceRouteConfig: () => {},
|
|
isActive: () => {},
|
|
};
|
|
|
|
export const mockMatch = {
|
|
location: {
|
|
action: '',
|
|
pathname: '',
|
|
search: '',
|
|
hash: '',
|
|
index: 0,
|
|
delta: 0,
|
|
query: {},
|
|
},
|
|
routeIndices: [],
|
|
routeParams: {},
|
|
params: {},
|
|
routes: [],
|
|
router: mockRouter,
|
|
route: {
|
|
getComponent: () => {},
|
|
},
|
|
};
|