From 91eca89cb7028c2606d833852c48875767ae71a6 Mon Sep 17 00:00:00 2001 From: Alrzini2025 Date: Sat, 28 Feb 2026 14:55:53 +0000 Subject: [PATCH 1/5] This is first part for Sprint-3 --- Sprint-3/2-practice-tdd/count.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/2-practice-tdd/count.test.js b/Sprint-3/2-practice-tdd/count.test.js index 179ea0ddf..7cc29e652 100644 --- a/Sprint-3/2-practice-tdd/count.test.js +++ b/Sprint-3/2-practice-tdd/count.test.js @@ -17,7 +17,7 @@ test("should count multiple occurrences of a character", () => { expect(count).toEqual(5); }); -// Scenario: No Occurrences +// Scenario: No Occurrences in file // Given the input string `str`, // And a character `char` that does not exist within `str`. // When the function is called with these inputs, From 5802c53a61e4ebed72509d9b33db93f86ca72ecb Mon Sep 17 00:00:00 2001 From: Alrzini2025 Date: Sat, 28 Feb 2026 15:08:25 +0000 Subject: [PATCH 2/5] solution for spring 3.1 --- .../1-implement-and-rewrite-tests/implement/1-get-angle-type.js | 2 +- .../implement/2-is-proper-fraction.js | 2 +- .../1-implement-and-rewrite-tests/implement/3-get-card-value.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js b/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js index 9e05a871e..bfc7ee13a 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js @@ -32,6 +32,6 @@ function assertEquals(actualOutput, targetOutput) { } // TODO: Write tests to cover all cases, including boundary and invalid cases. -// Example: Identify Right Angles +// Example: Identify Right Angles. const right = getAngleType(90); assertEquals(right, "Right angle"); diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js b/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js index 970cb9b64..1bcd84204 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js @@ -29,5 +29,5 @@ function assertEquals(actualOutput, targetOutput) { // TODO: Write tests to cover all cases. // What combinations of numerators and denominators should you test? -// Example: 1/2 is a proper fraction +// Example: 1/2 is a proper fraction. assertEquals(isProperFraction(1, 2), true); diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js b/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js index c7559e787..3d897461e 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js @@ -45,7 +45,7 @@ assertEquals(getCardValue("9♠"), 9); try { getCardValue("invalid"); - // This line will not be reached if an error is thrown as expected + // This line will not be reached if an error is thrown as expected. console.error("Error was not thrown for invalid card"); } catch (e) {} From 406890d68c902d5a22c21cedacaee532338fc624 Mon Sep 17 00:00:00 2001 From: Alrzini2025 Date: Sat, 28 Feb 2026 15:11:11 +0000 Subject: [PATCH 3/5] removing wrong file --- Sprint-3/2-practice-tdd/count.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/2-practice-tdd/count.test.js b/Sprint-3/2-practice-tdd/count.test.js index 7cc29e652..179ea0ddf 100644 --- a/Sprint-3/2-practice-tdd/count.test.js +++ b/Sprint-3/2-practice-tdd/count.test.js @@ -17,7 +17,7 @@ test("should count multiple occurrences of a character", () => { expect(count).toEqual(5); }); -// Scenario: No Occurrences in file +// Scenario: No Occurrences // Given the input string `str`, // And a character `char` that does not exist within `str`. // When the function is called with these inputs, From 21283510fdf7086344f682e29f341749c4102c8c Mon Sep 17 00:00:00 2001 From: Alrzini2025 Date: Sat, 28 Feb 2026 15:24:12 +0000 Subject: [PATCH 4/5] sprint 3.2 solution --- Sprint-3/2-practice-tdd/count.test.js | 2 +- Sprint-3/2-practice-tdd/get-ordinal-number.test.js | 2 +- Sprint-3/2-practice-tdd/repeat-str.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sprint-3/2-practice-tdd/count.test.js b/Sprint-3/2-practice-tdd/count.test.js index 179ea0ddf..8bf8f7d66 100644 --- a/Sprint-3/2-practice-tdd/count.test.js +++ b/Sprint-3/2-practice-tdd/count.test.js @@ -17,7 +17,7 @@ test("should count multiple occurrences of a character", () => { expect(count).toEqual(5); }); -// Scenario: No Occurrences +// Scenario: No Occurrences. // Given the input string `str`, // And a character `char` that does not exist within `str`. // When the function is called with these inputs, diff --git a/Sprint-3/2-practice-tdd/get-ordinal-number.test.js b/Sprint-3/2-practice-tdd/get-ordinal-number.test.js index adfa58560..05d7c0ef4 100644 --- a/Sprint-3/2-practice-tdd/get-ordinal-number.test.js +++ b/Sprint-3/2-practice-tdd/get-ordinal-number.test.js @@ -10,7 +10,7 @@ const getOrdinalNumber = require("./get-ordinal-number"); // into meaningful categories. Then, select representative samples from each category to test. // This approach improves coverage and makes our tests easier to maintain. -// Case 1: Numbers ending with 1 (but not 11) +// Case 1: Numbers ending with 1 (but not 11). // When the number ends with 1, except those ending with 11, // Then the function should return a string by appending "st" to the number. test("should append 'st' for numbers ending with 1, except those ending with 11", () => { diff --git a/Sprint-3/2-practice-tdd/repeat-str.test.js b/Sprint-3/2-practice-tdd/repeat-str.test.js index a3fc1196c..5956ed93b 100644 --- a/Sprint-3/2-practice-tdd/repeat-str.test.js +++ b/Sprint-3/2-practice-tdd/repeat-str.test.js @@ -1,4 +1,4 @@ -// Implement a function repeatStr +// Implement a function repeatStr. const repeatStr = require("./repeat-str"); // Given a target string `str` and a positive integer `count`, // When the repeatStr function is called with these inputs, From 463d9774d7c977b278c99afe14dc32b0f7ed670c Mon Sep 17 00:00:00 2001 From: Alrzini2025 Date: Sat, 28 Feb 2026 15:30:57 +0000 Subject: [PATCH 5/5] correcting files for this work --- .../1-implement-and-rewrite-tests/implement/1-get-angle-type.js | 2 +- .../implement/2-is-proper-fraction.js | 2 +- .../1-implement-and-rewrite-tests/implement/3-get-card-value.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js b/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js index bfc7ee13a..9e05a871e 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js @@ -32,6 +32,6 @@ function assertEquals(actualOutput, targetOutput) { } // TODO: Write tests to cover all cases, including boundary and invalid cases. -// Example: Identify Right Angles. +// Example: Identify Right Angles const right = getAngleType(90); assertEquals(right, "Right angle"); diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js b/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js index 1bcd84204..970cb9b64 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js @@ -29,5 +29,5 @@ function assertEquals(actualOutput, targetOutput) { // TODO: Write tests to cover all cases. // What combinations of numerators and denominators should you test? -// Example: 1/2 is a proper fraction. +// Example: 1/2 is a proper fraction assertEquals(isProperFraction(1, 2), true); diff --git a/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js b/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js index 3d897461e..c7559e787 100644 --- a/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js +++ b/Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js @@ -45,7 +45,7 @@ assertEquals(getCardValue("9♠"), 9); try { getCardValue("invalid"); - // This line will not be reached if an error is thrown as expected. + // This line will not be reached if an error is thrown as expected console.error("Error was not thrown for invalid card"); } catch (e) {}