Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

fix: assert time-left is formatted correctly #772

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

abdusabri
Copy link
Contributor

Pre-Submission Checklist

  • Your pull request targets the master branch of freeCodeCamp/testable-projects-fcc
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • Your changes have been tested either locally or using a newly created CDN based on your fork's testable-projects-fcc/build/bundle.js file
  • Working changes have been added to the build by running npm run build

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

  • Tested changes locally.

Description

This PR fixes an assertion issue for the pomodoro clock testing project. The issue was that all tests pass even if the time-left was incorrectly formatted as 00:00 instead of 60:00 when session length is set to 60

The following screenshots demonstrate the fix

image

image

An example project before the fix can be found here: https://abdusabri.github.io/fcc-pomodoro-bug/
An example project after the fix can be found here: https://abdusabri.github.io/fcc-pomodoro-fix/

@abdusabri
Copy link
Contributor Author

Thanks for checking @tbushman

I didn't change either of the links

https://abdusabri.github.io/fcc-pomodoro-bug/ -> uses the CDN version of the tests, and all tests pass

https://abdusabri.github.io/fcc-pomodoro-fix/ -> uses a production build of this PR's tests, and one test fails (screenshots in this PR's description)

Would it help if i send a few screenshots comparing them (showing the urls and more details)?

@abdusabri
Copy link
Contributor Author

@tbushman No worries! 🙂 and thanks for reviewing!

fix: assert time-left is formatted correctly

fix: assert time-left is formatted correctly, use getMinutes
@abdusabri abdusabri force-pushed the fix/assert-time-left-format branch from cd4184a to 7d0a548 Compare January 31, 2019 10:40
@abdusabri
Copy link
Contributor Author

@tbushman Thanks for the feedback

I've updated the code to use getMinutes function, which uses the RegExp, and I've rebased and squashed the commits.

@tbushman tbushman merged commit 783be40 into freeCodeCamp:master Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suite is missing a test for a pomodoro clock edge case
1 participant