MCPcopy Create free account
hub / github.com/dailydotdev/apps / mockRouter

Function mockRouter

packages/shared/src/components/shell/useQueryTab.spec.tsx:15–20  ·  view source on GitHub ↗
(asPath: string, query: Record<string, string>)

Source from the content-addressed store, hash-verified

13const replace = jest.fn();
14
15const mockRouter = (asPath: string, query: Record<string, string>) =>
16 jest.mocked(useRouter).mockReturnValue({
17 asPath,
18 query,
19 replace,
20 } as unknown as ReturnType<typeof useRouter>);
21
22describe('useQueryTab', () => {
23 beforeEach(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected