Skip to content

Commit aba0771

Browse files
committed
Refactor folders to match main
1 parent f9fac2a commit aba0771

4 files changed

Lines changed: 11 additions & 13 deletions

File tree

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ test("Valid single-digit card", () => {
1010
});
1111

1212
test("Arbitrary non-card string", () => {
13-
assert.throws(
14-
() => getCardValue("invalid"),
15-
/Expected a number followed by a suit, but got "invalid"/,
16-
"Expected clear error"
17-
);
13+
assert.throws(() => getCardValue("invalid"), /Expected a number followed by a suit, but got "invalid"/, "Expected clear error");
1814
});
1915

2016
// TODO: What other invalid card cases can you think of?

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ test(`Should return 11 when given an ace card`, () => {
1515
// To learn how to test whether a function throws an error as expected in Jest,
1616
// please refer to the Jest documentation:
1717
// https://jestjs.io/docs/expect#tothrowerror
18+

‎practice-tdd/count.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function countChar(stringOfCharacters, findCharacter) {
2-
return 5;
2+
return 5
33
}

‎sprint-3-stretch-exercises/password-validator.test.js‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ You must breakdown this problem in order to solve it. Find one test case first a
1616
*/
1717
import { isValidPassword } from "./password-validator.js";
1818
test("password has at least 5 characters", () => {
19-
// Arrange
20-
const password = "12345";
21-
// Act
22-
const result = isValidPassword(password);
23-
// Assert
24-
expect(result).toEqual(true);
25-
});
19+
// Arrange
20+
const password = "12345";
21+
// Act
22+
const result = isValidPassword(password);
23+
// Assert
24+
expect(result).toEqual(true);
25+
}
26+
);

0 commit comments

Comments
 (0)