Skip to content

Commit

Permalink
test: make GraphQL server test more reliable (#7758)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 authored Jan 2, 2022
1 parent b106ffc commit 912edac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/ParseGraphQLServer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2600,11 +2600,19 @@ describe('ParseGraphQLServer', () => {
// "SecondaryObject:bBRgmzIRRM" < "SecondaryObject:nTMcuVbATY" true
// base64("SecondaryObject:bBRgmzIRRM"") < base64(""SecondaryObject:nTMcuVbATY"") false
// "U2Vjb25kYXJ5T2JqZWN0OmJCUmdteklSUk0=" < "U2Vjb25kYXJ5T2JqZWN0Om5UTWN1VmJBVFk=" false
const originalIds = [getSecondaryObjectsResult.data.secondaryObject2.objectId,
getSecondaryObjectsResult.data.secondaryObject4.objectId];
expect(
findSecondaryObjectsResult.data.secondaryObjects.edges[0].node.objectId
).toBeLessThan(
).not.toBe(
findSecondaryObjectsResult.data.secondaryObjects.edges[1].node.objectId
);
expect(
originalIds.includes(findSecondaryObjectsResult.data.secondaryObjects.edges[0].node.objectId)
).toBeTrue();
expect(
originalIds.includes(findSecondaryObjectsResult.data.secondaryObjects.edges[1].node.objectId)
).toBeTrue();

const createPrimaryObjectResult = await apolloClient.mutate({
mutation: gql`
Expand Down

0 comments on commit 912edac

Please sign in to comment.