Skip to content

Commit 619ac8a

Browse files
apply prettier formatting and update tests
1 parent 882fa07 commit 619ac8a

File tree

12 files changed

+27
-44
lines changed

12 files changed

+27
-44
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

.prettierrc

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1 @@
1-
{
2-
"arrowParens": "always",
3-
"bracketSpacing": true,
4-
"embeddedLanguageFormatting": "auto",
5-
"htmlWhitespaceSensitivity": "css",
6-
"insertPragma": false,
7-
"jsxBracketSameLine": false,
8-
"jsxSingleQuote": false,
9-
"printWidth": 80,
10-
"proseWrap": "preserve",
11-
"quoteProps": "as-needed",
12-
"requirePragma": false,
13-
"semi": true,
14-
"singleQuote": false,
15-
"tabWidth": 2,
16-
"trailingComma": "es5",
17-
"useTabs": false,
18-
"vueIndentScriptAndStyle": false
19-
}
1+
{}

Sprint-1/1-key-exercises/2-initials.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ let lastName = "Johnson";
88
let initials = ``;
99

1010
// https://www.google.com/search?q=get+first+character+of+string+mdn
11-

Sprint-1/3-mandatory-interpret/3-to-pounds.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ const penceString = "399p";
22

33
const penceStringWithoutTrailingP = penceString.substring(
44
0,
5-
penceString.length - 1
5+
penceString.length - 1,
66
);
77

88
const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");
99
const pounds = paddedPenceNumberString.substring(
1010
0,
11-
paddedPenceNumberString.length - 2
11+
paddedPenceNumberString.length - 2,
1212
);
1313

1414
const pence = paddedPenceNumberString

Sprint-1/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This README will guide you through the different sections for this week.
1212

1313
## 1 Exercises
1414

15-
In this section, you'll have a short program and task. Some of the syntax may be unfamiliar - in this case, you'll need to look things up in documentation.
15+
In this section, you'll have a short program and task. Some of the syntax may be unfamiliar - in this case, you'll need to look things up in documentation.
1616

1717
https://developer.mozilla.org/en-US/docs/Web/JavaScript
1818

@@ -28,7 +28,7 @@ You must use documentation to make sense of anything unfamiliar - learning how t
2828

2929
You can also use `console.log` to check the value of different variables in the code.
3030

31-
https://developer.mozilla.org/en-US/docs/Web/JavaScript
31+
https://developer.mozilla.org/en-US/docs/Web/JavaScript
3232

3333
## 4 Explore - Stretch 💪
3434

Sprint-2/3-mandatory-implement/1-bmi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18-
// return the BMI of someone based off their weight and height
19-
}
18+
// return the BMI of someone based off their weight and height
19+
}

Sprint-2/5-stretch-extend/format-time.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const currentOutput = formatAs12HourClock("08:00");
1414
const targetOutput = "08:00 am";
1515
console.assert(
1616
currentOutput === targetOutput,
17-
`current output: ${currentOutput}, target output: ${targetOutput}`
17+
`current output: ${currentOutput}, target output: ${targetOutput}`,
1818
);
1919

2020
const currentOutput2 = formatAs12HourClock("23:00");
2121
const targetOutput2 = "11:00 pm";
2222
console.assert(
2323
currentOutput2 === targetOutput2,
24-
`current output: ${currentOutput2}, target output: ${targetOutput2}`
24+
`current output: ${currentOutput2}, target output: ${targetOutput2}`,
2525
);

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

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

55
module.exports = countChar;
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
function passwordValidator(password) {
2-
return password.length < 5 ? false : true
2+
return password.length < 5 ? false : true;
33
}
44

5-
6-
module.exports = passwordValidator;
5+
module.exports = passwordValidator;

Sprint-3/4-stretch/password-validator.test.js

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

0 commit comments

Comments
 (0)