Skip to content

Commit

Permalink
Merge branch 'main' into km-testing-jest-2
Browse files Browse the repository at this point in the history
  • Loading branch information
marvingay authored May 17, 2021
2 parents 5708c3d + ad1c0c4 commit a0977c9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 21 deletions.
31 changes: 15 additions & 16 deletions findTheOldest/findTheOldest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,59 @@ describe('findTheOldest', () => {
test('finds the oldest person!', () => {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 1942,
yearOfDeath: 1970,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the oldest person if someone is still living', () => {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 2018,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Ray');
});
test.skip('finds the oldest person if the OLDEST is still living', () => {
const people = [
{
name: 'Carly',
name: "Carly",
yearOfBirth: 1066,
},
{
name: 'Ray',
name: "Ray",
yearOfBirth: 1962,
yearOfDeath: 2011
yearOfDeath: 2011,
},
{
name: 'Jane',
name: "Jane",
yearOfBirth: 1912,
yearOfDeath: 1941
yearOfDeath: 1941,
},
]
expect(findTheOldest(people).name).toBe('Carly');
});

});
1 change: 0 additions & 1 deletion getTheTitles/getTheTitles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ describe('getTheTitles', () => {
test('gets titles', () => {
expect(getTheTitles(books)).toEqual(['Book','Book2']);
});

});
2 changes: 1 addition & 1 deletion palindromes/palindromes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const palindromes = function() {
const palindromes = function () {};

};

Expand Down
1 change: 0 additions & 1 deletion palindromes/palindromes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ describe('palindromes', () => {
test.skip('doesn\'t just always return true', () => {
expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false);
});

});
2 changes: 1 addition & 1 deletion repeatString/repeatString.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('repeatString', () => {

// DO NOT use Math.floor(Math.random() * 1000) in your code,
// this test generates a random number, then passes it into your code with a function parameter.
// 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
// 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
const number = Math.floor(Math.random() * 1000)
/*The .match(/((hey))/g).length is a regex that will count the number of heys
in the result, which if your function works correctly will equal the number that
Expand Down
1 change: 0 additions & 1 deletion snakeCase/snakeCase.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ describe('snakeCase', () => {
test.skip('works with WTF case', () => {
expect(snakeCase('SnAkE..CaSe..Is..AwEsOmE')).toEqual('snake_case_is_awesome');
});

});

0 comments on commit a0977c9

Please sign in to comment.