Harley Alexander
Harley Alexander
There are ts `any`s all over the place - total madness - while I tinkered to get this working. Have to go back through and strongly type everything.
Test coverage possible via hooks, use `@testing-library/react-hooks`. `useAuth()` - test error when not inside provider. Potentially refactor to `checkContext` function and isolate that test. - Mock `@aws-amplify/Auth` and test value...
Test coverage for; `nextTokenReducer` - an easy unit test, call it with {type: undefined}, expect null return - call it with `{ type: CRUD_GET_LIST_SUCCESS, payload: {nextToken: undefined} }` - expect...
Plenty of great inspiration in the [`ra-data-graphcool`](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphcool/src) package. Just a pain to cover all bases. Use `jest --watch --coverage` to find out which lines aren't being covered!