Skip to content

Commit 55b402f

Browse files
rewrote test to check an invalid suit
1 parent 32055e1 commit 55b402f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ test(`Should return 10 when given a K card`, () => {
5656
test(`Should throw an error when given an invalid card`, () => {
5757
expect(() => getCardValue("1♠")).toThrow("Invalid rank");
5858
});
59+
test(`Should throw an error when given an invalid card`, () => {
60+
expect(() => getCardValue("A♤")).toThrow("Invalid suit");
61+
});
5962

6063
// To learn how to test whether a function throws an error as expected in Jest,
6164
// please refer to the Jest documentation:

0 commit comments

Comments
 (0)