From dad9626656f2e10151e7efdc85bdb1a39116b033 Mon Sep 17 00:00:00 2001 From: Kapil Jain Date: Thu, 17 Oct 2019 20:20:01 -0400 Subject: [PATCH] fixed lint errors --- backend/src/schema/resolvers/follow.spec.js | 12 +++++++----- backend/src/schema/resolvers/shout.spec.js | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/src/schema/resolvers/follow.spec.js b/backend/src/schema/resolvers/follow.spec.js index 860b40687..0c186a139 100644 --- a/backend/src/schema/resolvers/follow.spec.js +++ b/backend/src/schema/resolvers/follow.spec.js @@ -106,7 +106,7 @@ describe('follow', () => { mutate({ mutation: mutationFollowUser, variables, - }) + }), ).resolves.toMatchObject({ errors: [{ message: 'Not Authorised!' }], data: { followUser: null }, @@ -124,18 +124,19 @@ describe('follow', () => { mutate({ mutation: mutationFollowUser, variables, - }) + }), ).resolves.toMatchObject({ data: { followUser: expectedUser }, errors: undefined, }) + // Test to make sure FOLLOWS relationship has "createdAt" date. const relation = await neode.cypher( 'MATCH (user:User {id: {id}})-[relationship:FOLLOWS]->(followed:User) WHERE relationship.createdAt IS NOT NULL RETURN relationship', - { id: 'u1' } + { id: 'u1' }, ) const relationshipProperties = relation.records.map( - record => record.get('relationship').properties.createdAt + record => record.get('relationship').properties.createdAt, ) expect(relationshipProperties[0]).toEqual(expect.any(String)) }) @@ -155,7 +156,7 @@ describe('follow', () => { query({ query: userQuery, variables: { id: user1.id }, - }) + }), ).resolves.toMatchObject({ data: { User: [expectedUser], @@ -164,6 +165,7 @@ describe('follow', () => { }) }) }) + describe('unfollow user', () => { beforeEach(async () => { variables = { id: user2.id } diff --git a/backend/src/schema/resolvers/shout.spec.js b/backend/src/schema/resolvers/shout.spec.js index 400701b05..6554ea7f8 100644 --- a/backend/src/schema/resolvers/shout.spec.js +++ b/backend/src/schema/resolvers/shout.spec.js @@ -106,10 +106,10 @@ describe('shout and unshout posts', () => { { userId1: 'current-user-id', userId2: 'another-user-post-id', - } + }, ) const relationshipProperties = relation.records.map( - record => record.get('relationship').properties.createdAt + record => record.get('relationship').properties.createdAt, ) expect(relationshipProperties[0]).toEqual(expect.any(String)) })