Skip to content

Commit 52878f1

Browse files
rewrote test to check an invalid card
1 parent 55b402f commit 52878f1

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
@@ -59,6 +59,9 @@ test(`Should throw an error when given an invalid card`, () => {
5959
test(`Should throw an error when given an invalid card`, () => {
6060
expect(() => getCardValue("A♤")).toThrow("Invalid suit");
6161
});
62+
test(`Should throw an error when given an invalid card`, () => {
63+
expect(() => getCardValue("A")).toThrow("Invalid card format");
64+
});
6265

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

0 commit comments

Comments
 (0)