Birmingham | 26-ITP-26 | Tasleem Adedokun | Sprint 3 | Coursework practice tdd#1192
Birmingham | 26-ITP-26 | Tasleem Adedokun | Sprint 3 | Coursework practice tdd#1192tasleemadedokun wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Function implementation is correct.
Test cases are well described and cover all possibility.
|
|
||
| function getOrdinalNumber(num) { | ||
| return "1st"; | ||
| const absNum = Math.abs(num); // handle negative numbers |
There was a problem hiding this comment.
Not sure why you made the assumption that num can be a negative value.
In you plan to reject invalid values, a stricter rule would be, only accept non-negative integers.
There was a problem hiding this comment.
Could consider testing a few more samples in this script - higher chance to detect bugs in code.
The original specification did not clearly state whether the character match should be case-sensitive. Most people would probably assume that it is, but to demonstrate our understanding or clarify the assumption we made, we could add test cases to convey this. For examples,
- A case to show that the match is case sensitive
- A case to show that the function is expected to work also for non-alphabets
There was a problem hiding this comment.
Could consider testing a few more samples in this script - higher chance to detect bugs in code.
The original specification did not clearly state whether the character match should be case-sensitive. Most people would probably assume that it is, but to demonstrate our understanding or clarify the assumption we made, we could add test cases to convey this. For examples,
- A case to show that the match is case sensitive
- A case to show that the function is expected to work also for non-alphabets
@cjyuan Thank you very much for always taking the time to highlight detailed information to work on, despite your busy schedules. I am glad it has been completed. However, at a free time I will go back to look into it. Once again, thank you very much.
Learners, PR Template
Self checklist
Changelist
Brief;
I have done all the required coursework and also made committed changes.