Skip to content

Commit fb62cf4

Browse files
rewrote test to check an invalid card format
1 parent 52878f1 commit fb62cf4

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
@@ -62,6 +62,9 @@ test(`Should throw an error when given an invalid card`, () => {
6262
test(`Should throw an error when given an invalid card`, () => {
6363
expect(() => getCardValue("A")).toThrow("Invalid card format");
6464
});
65+
test(`Should throw an error when given an invalid card`, () => {
66+
expect(() => getCardValue("")).toThrow("Invalid card format");
67+
});
6568

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

0 commit comments

Comments
 (0)