Skip to content

Commit b57c404

Browse files
committed
Few modifications done.
1 parent c68a37c commit b57c404

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ assertEquals(aceofSpades, 11);
5151
// Given a card with a rank between "2" and "9",
5252
// When the function is called with such a card,
5353
// Then it should return the numeric value corresponding to the rank (e.g., "5" should return 5).
54-
const fiveofHearts = getCardValue("5♥");
55-
assertEquals(fiveofHearts, 5);
54+
const numberCards = getCardValue("5♥");
55+
assertEquals(numberCards, 5);
5656
// ====> write your test here, and then add a line to pass the test in the function above
5757

5858

@@ -86,4 +86,6 @@ try {
8686
console.log("Test failed: no error thrown");
8787
} catch (error) {
8888
assertEquals(error.message, "Invalid Card");
89-
}
89+
}
90+
91+
// Functions, assertion and invalid rank tested

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ test("should throw an error for invalid cards", () => {
2828
expect(() => getCardValue("Z♠")).toThrow("Invalid Card");
2929
});
3030
// Sprint-3 rewrite-tests-with-jest/2-get-card-value.test.js. rewrote tests using jest
31+
// Few modifications done.

0 commit comments

Comments
 (0)