8000 Merge branch 'main' into km-testing-jest-2 · davidnth/javascript-exercises@a0977c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit a0977c9

Browse files
authored
Merge branch 'main' into km-testing-jest-2
2 parents 5708c3d + ad1c0c4 commit a0977c9

File tree

6 files changed

+17
-21
lines changed

6 files changed

+17
-21
lines changed

findTheOldest/findTheOldest.spec.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,59 @@ describe('findTheOldest', () => {
44
test('finds the oldest person!', () => {
55
const people = [
66
{
7-
name: 'Carly',
7+
name: "Carly",
88
yearOfBirth: 1942,
99
yearOfDeath: 1970,
1010
},
1111
{
12-
name: 'Ray',
12+
name: "Ray",
1313
yearOfBirth: 1962,
14-
yearOfDeath: 2011
14+
yearOfDeath: 2011,
1515
},
1616
{
17-
name: 'Jane',
17+
name: "Jane",
1818
yearOfBirth: 1912,
19-
yearOfDeath: 1941
19+
yearOfDeath: 1941,
2020
},
2121
]
2222
expect(findTheOldest(people).name).toBe('Ray');
2323
});
2424
test.skip('finds the oldest person if someone is still living', () => {
2525
const people = [
2626
{
27-
name: 'Carly',
27+
name: "Carly",
2828
yearOfBirth: 2018,
2929
},
3030
{
31-
name: 'Ray',
31+
name: "Ray",
3232
yearOfBirth: 1962,
33-
yearOfDeath: 2011
33+
yearOfDeath: 2011,
3434
},
3535
{
36-
name: 'Jane',
36+
name: "Jane",
3737
yearOfBirth: 1912,
38-
yearOfDeath: 1941
38+
yearOfDeath: 1941,
3939
},
4040
]
4141
expect(findTheOldest(people).name).toBe('Ray');
4242
});
4343
test.skip('finds the oldest person if the OLDEST is still living', () => {
4444
const people = [
4545
{
46-
name: 'Carly',
46+
name: "Carly",
4747
yearOfBirth: 1066,
4848
},
4949
{
50-
name: 'Ray',
50+
name: "Ray",
5151
yearOfBirth: 1962,
52-
yearOfDeath: 2011
52+
yearOfDeath: 2011,
5353
},
5454
{
55-
name: 'Jane',
55+
name: "Jane",
5656
yearOfBirth: 1912,
57-
yearOfDeath: 1941
57+
yearOfDeath: 1941,
5858
},
5959
]
6060
expect(findTheOldest(people).name).toBe('Carly');
6161
});
62-
6362
});

getTheTitles/getTheTitles.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ describe('getTheTitles', () => {
1515
test('gets titles', () => {
1616
expect(getTheTitles(books)).toEqual(['Book','Book2']);
1717
});
18-
1918
});

palindromes/palindromes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const palindromes = function() {
1+
const palindromes = function () {};
22

33
};
44

palindromes/palindromes.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ describe('palindromes', () => {
1919
test.skip('doesn\'t just always return true', () => {
2020
expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false);
2121
});
22-
2322
});

repeatString/repeatString.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('repeatString', () => {
2424

2525
// DO NOT use Math.floor(Math.random() * 1000) in your code,
2626
// this test generates a random number, then passes it into your code with a function parameter.
27-
// If this doesn't make sense, you should go read about functions here: https://www.theodinproject.com/courses/web-development-101/lessons/fundamentals-part-3
27+
// If this doesn't make sense, you should go read about functions here: https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/fundamentals-part-3
2828
const number = Math.floor(Math.random() * 1000)
2929
/*The .match(/((hey))/g).length is a regex that will count the number of heys
3030
in the result, which if your function works correctly will equal the number that

snakeCase/snakeCase.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ describe('snakeCase', () => {
1919
test.skip('works with WTF case', () => {
2020
expect(snakeCase('SnAkE..CaSe..Is..AwEsOmE')).toEqual('snake_case_is_awesome');
2121
});
22-
2322
});

0 commit comments

Comments
 (0)
0