Skip to content

Commit d111dca

Browse files
committed
updated PR template
1 parent 177f0d7 commit d111dca

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ test("should return true for a proper fraction", () => {
77
});
88

99
// Case 2: Identify Improper Fractions:
10+
test("should return false for an improper fraction (numerator > denominator)", () => {
11+
expect(isProperFraction(5, 2)).toEqual(false);
12+
});
1013

1114
// Case 3: Identify Negative Fractions:
15+
test("should return true for a proper fraction with negative numerator", () => {
16+
expect(isProperFraction(-4, 7)).toEqual(true);
17+
});
1218

1319
// Case 4: Identify Equal Numerator and Denominator:
20+
test("should return false when numerator equals denominator", () => {
21+
expect(isProperFraction(3, 3)).toEqual(false);
22+
});

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/3-get-card-value.test.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,41 @@
33
const getCardValue = require("../implement/3-get-card-value");
44

55
test("should return 11 for Ace of Spades", () => {
6-
const aceofSpades = getCardValue("A♠");
7-
expect(aceofSpades).toEqual(11);
6+
const aceOfSpades = getCardValue("A♠");
7+
expect(aceOfSpades).toEqual(11);
88
});
99

1010
// Case 2: Handle Number Cards (2-10):
11+
test("should return 5 for Five of Hearts", () => {
12+
const fiveOfHearts = getCardValue("5♥");
13+
expect(fiveOfHearts).toEqual(5);
14+
});
15+
16+
test("should return 10 for Ten of Clubs", () => {
17+
const tenOfClubs = getCardValue("10♣");
18+
expect(tenOfClubs).toEqual(10);
19+
});
1120
// Case 3: Handle Face Cards (J, Q, K):
21+
test("should return 10 for Jack of Diamonds", () => {
22+
const jackOfDiamonds = getCardValue("J♦");
23+
expect(jackOfDiamonds).toEqual(10);
24+
});
25+
26+
test("should return 10 for Queen of Hearts", () => {
27+
const queenOfHearts = getCardValue("Q♥");
28+
expect(queenOfHearts).toEqual(10);
29+
});
30+
31+
test("should return 10 for King of Spades", () => {
32+
const kingOfSpades = getCardValue("K♠");
33+
expect(kingOfSpades).toEqual(10);
34+
});
1235
// Case 4: Handle Ace (A):
36+
test("should return 11 for Ace of Clubs", () => {
37+
const aceOfClubs = getCardValue("A♣");
38+
expect(aceOfClubs).toEqual(11);
39+
});
1340
// Case 5: Handle Invalid Cards:
41+
test("should throw an error for invalid card rank", () => {
42+
expect(() => getCardValue("Z♠")).toThrow("Invalid card rank");
43+
});

0 commit comments

Comments
 (0)