fixed lint errors

This commit is contained in:
Kapil Jain 2019-10-17 20:20:01 -04:00
parent 202316e0a3
commit dad9626656
2 changed files with 9 additions and 7 deletions

View File

@ -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 }

View File

@ -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))
})