locationFixture.tsx 277 B

1234567891011121314
  1. import type {Location} from 'history';
  2. export function LocationFixture(params: Partial<Location> = {}): Location {
  3. return {
  4. key: '',
  5. search: '',
  6. hash: '',
  7. action: 'PUSH',
  8. state: null,
  9. query: {},
  10. pathname: '/mock-pathname/',
  11. ...params,
  12. };
  13. }