Skip to content

Commit 609355f

Browse files
committed
fixed the error description and test description
1 parent 675f16e commit 609355f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function getCardValue(card) {
3636
return Number(rankPart);
3737
}
3838
} else {
39-
throw new Error("Error");
39+
throw new Error("Invalid card. A valid card should contain a rank followed by the suit");
4040
}
4141
}
4242

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test(`Should return 11 when given an ace card`, () => {
1919
// https://jestjs.io/docs/expect#tothrowerror
2020

2121
// Number Cards (2-10)
22-
test(`should return the number (numeric value)`, () => {
22+
test(`should return the numeric value of number cards`, () => {
2323
expect(getCardValue("2♠")).toEqual(2);
2424
expect(getCardValue("10♥")).toEqual(10);
2525
expect(getCardValue("9♦")).toEqual(9);

0 commit comments

Comments
 (0)