Skip to content

Commit 7cd95ff

Browse files
additional-tests-added
1 parent 9e2dc09 commit 7cd95ff

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ assertEquals(getCardValue("A♠"), 11);
4949
assertEquals(getCardValue("2♥"), 2);
5050
assertEquals(getCardValue("10♥"), 10);
5151
assertEquals(getCardValue("Q♦"), 10);
52+
assertEquals(getCardValue("J♣"), 10);
53+
assertEquals(getCardValue("K♠"), 10);
5254
// Handling invalid cards
5355
try {
5456
getCardValue("invalid");

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ test(`Should return 2 when given an 2♥`, () => {
1717
test(`Should return 10 when given an 10♥`, () => {
1818
expect(getCardValue("10♥")).toEqual(10);
1919
});
20-
test(`Should return 10 when given an Q♦`, () => {
21-
expect(getCardValue("Q♦")).toEqual(10);
20+
test(`Should return 10 when given an J♣`, () => {
21+
expect(getCardValue("J♣")).toEqual(10);
22+
});
23+
test(`Should return 10 when given an K♠`, () => {
24+
expect(getCardValue("K♠")).toEqual(10);
2225
});
2326
test(`Should return Error when given an ♦Q`, () => {
2427
expect(function() {getCardValue("♦Q");}).toThrow("Invalid card");

0 commit comments

Comments
 (0)