Skip to content

Commit 316486e

Browse files
Merge branch 'main' into Jest-test-case-sprint-3A
2 parents 6649ae9 + 1a1b90b commit 316486e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Sprint-3/1-implement-and-rewrite-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ to choose test values that thoroughly test a function.
88
In the `implement` directory you've got a number of functions you'll need to implement.
99
For each function, you also have a number of different cases you'll need to check for your function.
1010

11-
Write your assertions and build up your program case by case. Don't rush to a solution. The point of these assignments is to learn how to write assertions and build up a program step by step.
11+
Write your implementation and your tests to cover the cases the function should fulfil.
1212

1313
Here is a recommended order:
1414

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ assertEquals(getCardValue("5♠"), 5);
9191
try {
9292
getCardValue("invalid");
9393
// This line will not be reached if an error is thrown as expected
94-
console.error("Error was not thrown for invalid card");
95-
} catch (e) {}
94+
console.error("Error was not thrown for invalid card 😢");
95+
} catch (e) {
96+
console.log("Error thrown for invalid card 🎉");
97+
}
9698

9799
try {
98100
getCardValue("A");

0 commit comments

Comments
 (0)