Open mayteio opened 4 years ago
Test coverage for;
nextTokenReducer
{ type: CRUD_GET_LIST_SUCCESS, payload: {nextToken: undefined} }
{ type: CRUD_GET_LIST_SUCCESS, payload: {nextToken: "nextToken"} }
UnconnectedRaAmplifyPagination
<UnconnectedRaAmplifyPagination page={1} nextToken={null} />
<UnconnectedRaAmplifyPagination page={1} nextToken="nextToken" />
expect(getByText(/next/i)).toBeInTheDocument()
<UnconnectedRaAmplifyPagination page={2} nextToken=null />
expect(getByText(/previous/i)).toBeInTheDocument()
Test coverage for;
nextTokenReducer
{ type: CRUD_GET_LIST_SUCCESS, payload: {nextToken: undefined} }
- expect null return{ type: CRUD_GET_LIST_SUCCESS, payload: {nextToken: "nextToken"} }
expect nextToken returnUnconnectedRaAmplifyPagination
<UnconnectedRaAmplifyPagination page={1} nextToken={null} />
- expect nothing returned<UnconnectedRaAmplifyPagination page={1} nextToken="nextToken" />
-expect(getByText(/next/i)).toBeInTheDocument()
<UnconnectedRaAmplifyPagination page={2} nextToken=null />
-expect(getByText(/previous/i)).toBeInTheDocument()