Skip to content

Birmingham | 26-ITP-26 | Tasleem Adedokun | Sprint 3 | Coursework practice tdd#1192

Open
tasleemadedokun wants to merge 3 commits intoCodeYourFuture:mainfrom
tasleemadedokun:coursework/sprint-3-practice-tdd
Open

Birmingham | 26-ITP-26 | Tasleem Adedokun | Sprint 3 | Coursework practice tdd#1192
tasleemadedokun wants to merge 3 commits intoCodeYourFuture:mainfrom
tasleemadedokun:coursework/sprint-3-practice-tdd

Conversation

@tasleemadedokun
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Brief;

I have done all the required coursework and also made committed changes.

@tasleemadedokun tasleemadedokun added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Mar 6, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Author

Choose a reason for hiding this comment

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

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.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants