Last active
June 2, 2020 05:50
-
-
Save dagda1/e8ae7f22ba52ff353afa8ffc53e4de3a to your computer and use it in GitHub Desktop.
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 { | |
result: { current }, | |
} = renderHook(() => useGetApplicationTypeFromUrl(), { | |
wrapper: ({ children }) => <Provider store={store}>{children}</Provider>, | |
}); | |
expect(current).toBe(expected); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment