Skip to content

Commit d32864f

Browse files
committed
Done adding in new tests, now cleaning up older ones.
1 parent 0ab03d7 commit d32864f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,17 @@ test(`Should throw error "Incorrect suit given" when given wrong suit with corre
127127
});
128128

129129
// number 10 (valid double digit number) with invalid suit
130-
130+
test(`Should throw error "Incorrect suit given" when given wrong suit with correct face 10"`, () => {
131+
expect(() => getCardValue("10☺")).toThrow(new Error("Incorrect suit given"));
132+
});
131133
// J/Q/K with invalid suit
134+
test(`Should throw error "Incorrect suit given" when given wrong suit with correct face royals J/Q/K"`, () => {
135+
expect(() => getCardValue("J☺")).toThrow(new Error("Incorrect suit given"));
136+
expect(() => getCardValue("Q☺")).toThrow(new Error("Incorrect suit given"));
137+
expect(() => getCardValue("K☺")).toThrow(new Error("Incorrect suit given"));
138+
});
132139

133140
// A with invalid suit
141+
test(`Should throw error "Incorrect suit given" when given wrong suit with correct face Ace"`, () => {
142+
expect(() => getCardValue("A☺")).toThrow(new Error("Incorrect suit given"));
143+
});

0 commit comments

Comments
 (0)