Skip to content

Commit 2934b0e

Browse files
committed
Added test coverage cases
1 parent f8bbdf0 commit 2934b0e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

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

55
test("should return 11 for an Ace", () => {
6-
const aceofSpades = getCardValue("A♠");
7-
expect(aceofSpades).toEqual(11);
6+
expect(getCardValue("A♠")).toEqual(11);
7+
expect(getCardValue("A♥")).toEqual(11);
8+
89
});
910

11+
1012
// Case 2: Handle Number Cards (2-10):
1113
test("should return number cards for (2-10)", () => {
1214
const twoOfSpades = getCardValue("2♠");
@@ -33,4 +35,7 @@ test("should throw an error for invalid cards", () => {
3335
});
3436
// Sprint-3 rewrite-tests-with-jest/2-get-card-value.test.js. rewrote tests using jest
3537
// Few modifications done.
36-
// Completed incomplete description and added a test for multiple values such as boundr values 2 and 10 in line 12-17
38+
// Completed incomplete description and added a test
39+
// for multiple values such as boundr values 2 and 10 in line 12-17
40+
41+
// Added test coverage cases

0 commit comments

Comments
 (0)