Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
41faaac
have done my key-implement exercise
Millena28 Feb 21, 2025
fb392b3
done the mandatory-rewrite
Millena28 Feb 21, 2025
52148a6
Done the mandatory-practice
Millena28 Feb 27, 2025
4d0497e
Done stretch investigate and implemented new card-validator file
Millena28 Feb 28, 2025
13220cd
done ALL
Millena28 Feb 28, 2025
396094b
made some corrections from review
Millena28 Mar 18, 2025
f3b70e8
Merge branch 'CodeYourFuture:coursework/sprint-3' into coursework/spr…
avatarit Jun 28, 2025
8ca4e8e
Implement angle type identification in getAngleType function
avatarit Jun 28, 2025
a9c9341
Remove placeholder comments for missing tests in getAngleType function
avatarit Jun 28, 2025
b1b2078
Refactor getAngleType function for improved readability and consistency
avatarit Jun 28, 2025
78e3a52
Add assertions for zero numerator check in isProperFraction function
avatarit Jun 28, 2025
c75235c
Fix formatting inconsistencies in angle type assertions for clarity
avatarit Jun 28, 2025
39aad2d
Refactor getCardValue function to improve card rank extraction and va…
avatarit Jun 28, 2025
0d2e786
Refactor getAngleType function to streamline angle classification logic
avatarit Jul 2, 2025
ef3385f
Refactor getCardValue function for improved clarity and error handling
avatarit Jul 2, 2025
f381483
Update package-lock.json to reflect changes in package names and vers…
avatarit Jul 2, 2025
49bcbfe
Refactor isProperFraction function and update tests for accuracy
avatarit Jul 2, 2025
5774458
Remove unnecessary files: package.json, readme.md, and image assets
avatarit Jul 2, 2025
9226863
Add tests for getCardValue function to validate card value retrieval …
avatarit Jul 2, 2025
e8bdd72
Add getCardValue function to retrieve card values with error handling
avatarit Jul 2, 2025
03fd47d
Add tests for getAngleType function to validate angle identification
avatarit Jul 2, 2025
61cdb3e
Implement getAngleType function with angle classification and corresp…
avatarit Jul 2, 2025
41d94fc
Implement isProperFraction function with comprehensive test cases
avatarit Jul 2, 2025
0f70f77
Implement isProperFraction function to evaluate proper fractions
avatarit Jul 2, 2025
830b5e4
Refactor code structure for improved readability and maintainability
avatarit Jul 2, 2025
b500e15
Fix the code of get angle
avatarit Jul 2, 2025
e931299
Remove unnecessary blank line in isProperFraction.js
avatarit Jul 2, 2025
315ab1a
fixed the code issue
avatarit Jul 2, 2025
aae7d84
Remove unnecessary blank line at the beginning of get-card-value.js
avatarit Jul 2, 2025
2fd86de
Refactor angle type function to improve clarity and return default va…
avatarit Jul 2, 2025
c693e17
Refactor angle type tests for clarity by removing redundant comments
avatarit Jul 2, 2025
4330f25
fix the issue in the code
avatarit Jul 2, 2025
d92d35c
Update isProperFraction test file
avatarit Jul 2, 2025
c45f222
Refactor getCardValue function for improved readability by adjusting …
avatarit Jul 2, 2025
388622f
Refactor test cases for getCardValue function by reorganizing comment…
avatarit Jul 2, 2025
51997e1
Update countChar function
avatarit Jul 2, 2025
88e292d
Fix formatting of comment in count.test.js for consistency
avatarit Jul 2, 2025
7829d7e
Refactor getOrdinalNumber function for improved readability by adjust…
avatarit Jul 2, 2025
e924d5d
update ordinal-number.test.js for improved readability
avatarit Jul 2, 2025
475029a
Fix formatting
avatarit Jul 2, 2025
65bcde5
implement the code
avatarit Jul 2, 2025
fef80b8
Refactor isValidCreditCard function for improved readability and cons…
avatarit Jul 3, 2025
9549f29
The questions have been answerd
avatarit Jul 3, 2025
97d365f
fix passwordValidator function
avatarit Jul 3, 2025
35c9171
update the file
avatarit Jul 3, 2025
5677d8b
Refactor angle type identification tests for clarity and consistency;…
avatarit Jul 13, 2025
ec1de20
Refactor isProperFraction function for improved logic and to handle z…
avatarit Jul 13, 2025
11f25a5
Fix invalid card rank test case variable name for consistency
avatarit Jul 13, 2025
a9d379c
Add test case for handling unknown angles in angle type identification
avatarit Jul 13, 2025
d2b2de9
Refactor isProperFraction function for improved logic and update test…
avatarit Jul 13, 2025
c571045
Add tests for negative numbers, non-integer inputs, and zero in getOr…
avatarit Jul 13, 2025
4f777e0
Implement repeat function with input validation and update tests for …
avatarit Jul 14, 2025
749afc7
Remove redundant Ace test cases for different suits in getCardValue t…
avatarit Jul 14, 2025
5ff8087
Refactor password validator and update tests for clarity and accuracy
avatarit Jul 14, 2025
dc7f375
Fix error message for negative count in repeat function and update co…
avatarit Jul 14, 2025
2c6495f
Fixed the issues
avatarit Jul 18, 2025
508e086
Delete package.json
avatarit Jul 18, 2025
c38f34c
Fixed the comments
avatarit Jul 19, 2025
6d0daca
json file
avatarit Jul 19, 2025
b657e8d
fix: restore package files to match base branch
avatarit Jul 19, 2025
4e1cb4a
Removes trailing newline from extensions configuration
avatarit Jul 20, 2025
22bc718
remove json files from PR
avatarit Jul 20, 2025
9d595c7
Merge branch 'CodeYourFuture:main' into coursework/sprint-3
avatarit Jul 20, 2025
5477c7a
Delete .github/FUNDING.yml
avatarit Jul 20, 2025
1ddec67
remove files from PR
avatarit Jul 22, 2025
930871b
remove form PR
avatarit Jul 22, 2025
8999d7c
update the funding.yml file
avatarit Jul 22, 2025
633b57b
remove .gitignore from PR
avatarit Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for getAngleType function to validate angle identification
  • Loading branch information
avatarit committed Jul 2, 2025
commit 03fd47deb716b68c0c18a27a08464dbe772a1d37
45 changes: 45 additions & 0 deletions Sprint-3/2-mandatory-rewrite/1-get-angle-type.test.js

Choose a reason for hiding this comment

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

This is a good set of tests. I would recommend adding a test for "Unknown angle type" since this is a part of your getAngleType function.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const getAngleType = require("./1-get-angle-type");

test("should identify right angle (90°)", () => {
expect(getAngleType(90)).toEqual("Right angle");
});

// REPLACE the comments with the tests
// make your test descriptions as clear and readable as possible

// Case 2: Identify Acute Angles:
test("should identify acute angles (less than 90°)", () => {
expect(getAngleType(45)).toEqual("Acute angle");
expect(getAngleType(1)).toEqual("Acute angle");
expect(getAngleType(89)).toEqual("Acute angle");
});

// When the angle is less than 90 degrees,
// Then the function should return "Acute angle"

// Case 3: Identify Obtuse Angles:
test("should identify obtuse angles (between 90° and 180°)", () => {
expect(getAngleType(120)).toEqual("Obtuse angle");
expect(getAngleType(91)).toEqual("Obtuse angle");
expect(getAngleType(179)).toEqual("Obtuse angle");
});
// When the angle is greater than 90 degrees and less than 180 degrees,
// Then the function should return "Obtuse angle"

// Case 4: Identify Straight Angles:
test("should identify straight angle (180°)", () => {
expect(getAngleType(180)).toEqual("Straight angle");
});

// When the angle is exactly 180 degrees,
// Then the function should return "Straight angle"

// Case 5: Identify Reflex Angles:
test("should identify reflex angles (between 180° and 360°)", () => {
expect(getAngleType(270)).toEqual("Reflex angle");
expect(getAngleType(181)).toEqual("Reflex angle");
expect(getAngleType(359)).toEqual("Reflex angle");
});

// When the angle is greater than 180 degrees and less than 360 degrees,
// Then the function should return "Reflex angle"