Skip to content

Commit d8e8c60

Browse files
committed
modified: Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js
modified: Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/3-get-card-value.test.js modified: Sprint-3/2-practice-tdd/count.test.js
1 parent 6152bda commit d8e8c60

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ test("should return false for equal numerator and denominator", () => {
2121
expect(isProperFraction(4, 4)).toEqual(false);
2222
});
2323

24-
// We can run this test file using the command `npx jest 1-get-angle-type.test.js`
24+
// We can run this test file using the command `npx jest 2-is-proper-fraction.test.js`
2525
// in the terminal. Making sure we are in the directory where this file is located.
26-
// If we have Jest installed globally, you can simply run `jest 1-get-angle-type.test.js`
26+
// If we have Jest installed globally, you can simply run `jest 2-is-proper-fraction.test.js`
2727
// instead. If you have added a test script to your package.json file, you can also run
28-
// `npm test 1-get-angle-type.test.js` to execute the tests.
28+
// `npm test 2-is-proper-fraction.test.js` to execute the tests.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ test("should return null for invalid cards", () => {
3434
expect(getCardValue("Z♠")).toBeNull();
3535
});
3636

37-
// We can run this test file using the command `npx jest 1-get-angle-type.test.js`
37+
// We can run this test file using the command `npx jest 3-get-card-value.test.js`
3838
// in the terminal. Making sure we are in the directory where this file is located.
39-
// If we have Jest installed globally, you can simply run `jest 1-get-angle-type.test.js`
39+
// If we have Jest installed globally, you can simply run `3-get-card-value.test.js`
4040
// instead. If you have added a test script to your package.json file, you can also run
41-
// `npm test 1-get-angle-type.test.js` to execute the tests.
41+
// `npm test 3-get-card-value.test.js` to execute the tests.

Sprint-3/2-practice-tdd/count.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ test("should count multiple occurrences of a character", () => {
2222
// And a character char that does not exist within the case-sensitive str,
2323
// When the function is called with these inputs,
2424
// Then it should return 0, indicating that no occurrences of the char were found in the case-sensitive str.
25+
test("should return 0 when character does not exist in string", () => {
26+
const str = "mnopqrst";
27+
const char = "z";
28+
const count = countChar(str, char);
29+
expect(count).toEqual(0);
30+
});

0 commit comments

Comments
 (0)