-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
166840926 article comments #56
Conversation
@@ -0,0 +1,51 @@ | |||
import express from 'express'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
src/helpers/commentHelpers.js
Outdated
@@ -0,0 +1,40 @@ | |||
import responseGerator from './responseGenerator'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
src/database/models/comment.js
Outdated
return Comments; | ||
}; | ||
|
||
export default comments; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
@@ -0,0 +1,46 @@ | |||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'module' is not defined no-undef
@@ -0,0 +1,140 @@ | |||
/* eslint-disable require-jsdoc */ | |||
import models from '../database/models'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
022d8ff
to
6d09cbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @olorunwalawrence 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job! @lawarence, I left you a comment. Kindly review and let's get the merged as soon as possible
}); | ||
}); | ||
|
||
describe('PUT api/v1/comments/:commentId', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Good @olorunwalawrence. However, None of your tests here catered for a successful comment update. Kindly revisit this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No success case in the tests. All the tests account for only for failure cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the suggested changes including the grammatical errors in test descriptions.
This is good to go afterward.
expect((res.body.data.rows[0] = 1)); | ||
}); | ||
|
||
it('should not list when comment token is invalid', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behaviour is not right. Users should be able to see comments whether or not they're logged in.
src/test/article.spec.js
Outdated
expect(res.status).to.equal(401); | ||
expect(res.body.message).to.be.equal('Token is not valid'); | ||
}); | ||
it('User should not be able to comment if not authenticated', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be able to update a comment if not authenticated.
}); | ||
}); | ||
|
||
describe('PUT api/v1/comments/:commentId', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No success case in the tests. All the tests account for only for failure cases
9dd58cc
to
3eee5c3
Compare
bdb31e0
to
dbd9c0f
Compare
- create article comment functionality - create artilce comment test and validations [Finishes #166840926]
dbd9c0f
to
b340526
Compare
166840926 article comments
166840926 article comments
What does this PR do?
create article comment
Description of the task to be completed
How to manually test this PR
166840926-article-comments
What is the story identity?
166840926