Skip to content

Commit 79b5c1a

Browse files
committed
Added in tests for court cards (JQK) as per feedback from Pull Request
1 parent fc0bbf0 commit 79b5c1a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ test(`Should return 10 when given a 10 card`, () => {
1818
expect(getCardValue("10♠")).toEqual(10);
1919
});
2020
// Face Cards (J, Q, K)
21+
test(`Should return 10 when given a Jack card`, () => {
22+
expect(getCardValue("J♠")).toEqual(10);
23+
});
24+
test(`Should return 10 when given a Queen card`, () => {
25+
expect(getCardValue("Q♠")).toEqual(10);
26+
});
27+
test(`Should return 10 when given a King card`, () => {
28+
expect(getCardValue("K♠")).toEqual(10);
29+
});
2130
// Invalid Cards
2231
test(`Should throw an error when given an invalid card`, () => {
2332
expect(() => getCardValue("11♠")).toThrow("Invalid card: Invalid rank");

0 commit comments

Comments
 (0)