Exhaustively test and fix formatAs12HourClock

Open
#1,620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
testing

Research direction

Open the format-clock-edge-cases directory from the linked preparation material and locate the formatAs12HourClock implementation and its existing tests. Start by reviewing the current cases, then add tests covering valid-input edge cases and use them to guide the fix; done means all valid inputs produce the correct 12-hour format.

Written by the indexing model from the issue text.

Description

🏕 Priority Mandatory 🐇 Size Small 📅 Sprint 1 Submit:PR

https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/tree/main/format-clock-edge-cases

In the prep, we looked at a formatAs12HourClock function, and we fixed some bugs in it.

It still has bugs. Think of as many edge-cases as you can with this code. Write tests for all of them, and fix this code so that it works correctly for all valid inputs. You don't need to worry about invalid inputs (e.g. "25:00").

Dominant language
JavaScript
Stars
0
Forks
397
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeYourFuture/Module-Structuring-and-Testing-Data

All issues in CodeYourFuture/Module-Structuring-and-Testing-Data

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.