Fixing some test linting warnings, and duplicate data declaration

This commit is contained in:
Justin Dalrymple 2018-06-06 12:53:03 -04:00
parent a7339dd69c
commit eeec3716ad
2 changed files with 3 additions and 5 deletions

View File

@ -76,8 +76,6 @@ async function getPaginated(service, endpoint, options = {}) {
data = response.body;
}
const data = Array.isArray(response.body) ? [...response.body, ...more] : response.body;
if (queryOptions.page && showPagination) {
return {
data,

View File

@ -107,7 +107,7 @@ describe('RequestHelper.get()', () => {
{ maxPages: 1 },
);
expect(response.length).toBe(2);
expect(response).toHaveLength(2);
expect(response[0].prop1).toBe(1);
response.forEach((l, index) => {
@ -123,7 +123,7 @@ describe('RequestHelper.get()', () => {
{ page: 2 },
);
expect(response.length).toBe(2);
expect(response).toHaveLength(2);
expect(response[0].prop1).toBe(3);
response.forEach((l, index) => {
@ -140,7 +140,7 @@ describe('RequestHelper.get()', () => {
);
expect(response.data).toBeDefined();
expect(response.data.length).toBe(2);
expect(response.data).toHaveLength(2);
expect(response.data[0].prop1).toBe(3);
response.data.forEach((l, index) => {