Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens authored Feb 19, 2023
1 parent 27df8e6 commit ab1f8ba
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/api-tests/queries/cursor-pagination.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('cursor pagination basic tests', () => {
await testEnv.disconnect();
});

test('basic cursor pagination test (graphql api)', async () => {
test('cursor pagination test (graphql api)', async () => {
const { errors, data } = await context.graphql.raw({
query: `query { posts(
take: 6,\
Expand All @@ -70,7 +70,7 @@ describe('cursor pagination basic tests', () => {
});
});

test('basic cursor pagination test (query api)', async () => {
test('cursor pagination test (query api)', async () => {
const result1 = await context.query.Post.findMany({
take: 6,
skip: 1,
Expand All @@ -84,7 +84,7 @@ describe('cursor pagination basic tests', () => {
expect(result1).toEqual(Array.from(Array(6).keys()).map(_ => posts[currentOrder++]));
});

test('basic cursor pagination test (db api)', async () => {
test('cursor pagination test (db api)', async () => {
const result1 = await context.db.Post.findMany({
take: 6,
skip: 1,
Expand All @@ -97,17 +97,18 @@ describe('cursor pagination basic tests', () => {
expect(result1).toEqual(Array.from(Array(6).keys()).map(_ => posts[currentOrder++]));
});

test('basic cursor pagination through relation', async () => {
test('cursor pagination through relation', async () => {
const { errors, data } = await context.graphql.raw({
query: `query {\
user(where: { id: "${userId}"}) {\
posts(\
take: 6,\
skip: 1,\
cursor: { order: 5 }\
orderBy: { order: asc }\
) { id order }\
} }`,
posts(\
take: 6,\
skip: 1,\
cursor: { order: 5 }\
orderBy: { order: asc }\
) { id order }\
}\
}`,
});
expect(errors).toEqual(undefined);
let currentOrder = 6;
Expand Down

0 comments on commit ab1f8ba

Please sign in to comment.