diff --git a/packages/auth/src/graphql/resolvers/grant.test.ts b/packages/auth/src/graphql/resolvers/grant.test.ts index e50a006cea..74d7d624b1 100644 --- a/packages/auth/src/graphql/resolvers/grant.test.ts +++ b/packages/auth/src/graphql/resolvers/grant.test.ts @@ -59,6 +59,7 @@ describe('Grant Resolvers', (): void => { const grant = await createGrant(deps) grants.push(grant) } + grants.reverse() const query = await appContainer.apolloClient .query({ @@ -173,6 +174,8 @@ describe('Grant Resolvers', (): void => { grants.push(grant) } + const filteredGrants = grants.slice(0, 2).reverse() + const filter = { identifier: { in: [identifier] @@ -205,7 +208,7 @@ describe('Grant Resolvers', (): void => { }) expect(query.edges).toHaveLength(2) query.edges.forEach((edge, idx) => { - const grant = grants[idx] + const grant = filteredGrants[idx] expect(edge.cursor).toEqual(grant.id) expect(edge.node).toEqual({ __typename: 'Grant', diff --git a/packages/auth/src/graphql/resolvers/page.test.ts b/packages/auth/src/graphql/resolvers/page.test.ts index c20f984241..260f5b97ce 100644 --- a/packages/auth/src/graphql/resolvers/page.test.ts +++ b/packages/auth/src/graphql/resolvers/page.test.ts @@ -83,7 +83,7 @@ export const getPageTests = ({ for (let i = 0; i < 50; i++) { models.push(await createModel()) } - return models + return models.reverse() } test('pageInfo is correct on default query without params', async (): Promise => {