Skip to content
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

#159987724 Users should be able to see time it takes to read an article #42

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

CEOehis
Copy link
Contributor

@CEOehis CEOehis commented Sep 11, 2018

What does this PR do?

add read time to an article.

Description of Task to be completed?

Extended the article model to include timeToRead column. Calculate time
to read an article then save the article.

  • Add calculateTimeToRead helper method
  • Add pre-save hook
  • include relevant tests

How should this be manually tested?

Run npm run migrate
Run npm run start:dev
send a POST request to /api/articles/ to create an article

What are the relevant pivotal tracker stories?

#159987724

);
},

down: (queryInterface) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected block statement surrounding arrow body; move the returned value immediately after the => arrow-body-style

@@ -0,0 +1,18 @@
module.exports = {
up: (queryInterface, Sequelize) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected block statement surrounding arrow body; move the returned value immediately after the => arrow-body-style

Extended the article model to include timeToRead column. Calculate time
to read article then save article.

- Add calculateTimeToRead helper method
- Add pre save hook
- include relevant tests
@coveralls
Copy link

coveralls commented Sep 11, 2018

Pull Request Test Coverage Report for Build 283

  • 11 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 93.692%

Totals Coverage Status
Change from base Build 278: 0.05%
Covered Lines: 1099
Relevant Lines: 1149

💛 - Coveralls

Copy link
Contributor

@d-beloved d-beloved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@GodswillOnuoha GodswillOnuoha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants