This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = { | |
obj = { | |
chunkName() { | |
return \\"moment\\"; | |
}, | |
isReady(props) { | |
return __loadable_isReady__(this, props); | |
}, | |
importAsync: (), | |
requireAsync(props) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
globals: { | |
MyGlobal: true, | |
}, | |
parser: '@typescript-eslint/parser', | |
extends: [ | |
'plugin:@typescript-eslint/recommended', | |
'plugin:jest/recommended', | |
'plugin:jest-formatting/recommended', | |
'prettier/@typescript-eslint', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test.each` | |
url | path | expected | message | |
${'/csg/product-selector'} | ${RoleDetailsUrl} | ${makeCsgUrl(RoleDetailsUrl)} | ${'should be csg url'} | |
${'/applicant/join/product-selector'} | ${ProductSelector} | ${makeApplicantJoinUrl(ProductSelector)} | ${'should be applicant url'} | |
${'/applicant/existing/current-name'} | ${CurrentName} | ${makeApplicantExistingUrl(CurrentName)} | ${'should be applicant url'} | |
${'/personal-employer/join/details'} | ${PERoleDetailsUrl} | ${makePersonalEmployerJoinUrl(PERoleDetailsUrl)} | ${'should be personal employer url'} | |
`('url:$url is is $expected, // $message ', ({ url, expected }) => { | |
history.push(url); | |
const { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock('react-router-dom', () => ({ | |
...jest.requireActual('react-router-dom'), | |
useHistory: () => history, | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock('react-router-dom', () => ({ | |
...jest.requireActual('react-router-dom'), | |
useHistory: () => history, | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock('react-router-dom', () => ({ | |
...jest.requireActual('react-router-dom'), | |
useHistory: () => history, | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock('react-router-dom', () => ({ | |
...jest.requireActual('react-router-dom'), | |
useHistory: () => history, | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock('react-router-dom', () => ({ | |
...jest.requireActual('react-router-dom'), | |
useHistory: () => history, | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type TransformerFunc<T> = (src: T) => any; | |
export type TransformerMap<S> = { | |
[P in keyof S]?: | |
| S[P] | |
| TransformerFunc<S> | |
| TransformerFunc<S[P]> | |
| TransformerActions | |
| TransformerMap<S[P]>; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type ComponentPropsType<C> = C extends React.FC<infer P> ? P : never; | |
export type ThenType<T> = T extends Promise<infer U> ? U : never; |