Skip to content

Commit ef9ea5e

Browse files
Updated for readability
1 parent 6bff13c commit ef9ea5e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,29 @@ test(`Should return 10 when given an K♠`, () => {
2424
expect(getCardValue("K♠")).toEqual(10);
2525
});
2626
test(`Should throw Error when given an ♦Q`, () => {
27-
expect(function() {getCardValue("♦Q");}).toThrow("Invalid card");
27+
expect(function() {
28+
getCardValue("♦Q");
29+
}).toThrow("Invalid card");
2830
});
2931
test(`Should throw Error when given an 11♦`, () => {
30-
expect(function() {getCardValue("11♦")}).toThrow("Invalid card");
32+
expect(function() {
33+
getCardValue("11♦");
34+
}).toThrow("Invalid card");
3135
});
3236
test(`Should throw Error when given an AX`, () => {
33-
expect(function() {getCardValue("AX")}).toThrow("Invalid card");
37+
expect(function() {
38+
getCardValue("AX");
39+
}).toThrow("Invalid card");
3440
});
3541
test(`Should throw Error when given an KX`, () => {
36-
expect(function() {getCardValue("KX")}).toThrow("Invalid card");
42+
expect(function() {
43+
getCardValue("KX");
44+
}).toThrow("Invalid card");
3745
});
3846
test(`Should throw Error when given an 5X`, () => {
39-
expect(function() {getCardValue("5X")}).toThrow("Invalid card");
47+
expect(function() {
48+
getCardValue("5X");
49+
}).toThrow("Invalid card");
4050
});
4151

4252

0 commit comments

Comments
 (0)