Skip to content

Commit

Permalink
chapter 02: adding two more tests, one of them intetionally fails
Browse files Browse the repository at this point in the history
  • Loading branch information
devcorpio committed Jan 9, 2019
1 parent 0f54abd commit 6d01b7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chapter_02-a-first-unit-test/LogAn/logAnalyzer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ describe('isValidLogFileName', () => {
const result = logAnalyzer.isValidLogFileName('johndoe.js');
expect(result).toBe(false);
});

it('good extension in lowercase returns true', () => {
const result = logAnalyzer.isValidLogFileName('johndoe.slf');
expect(result).toBe(true);
});

it('good extension in uppercase returns true', () => {
const result = logAnalyzer.isValidLogFileName('johndoe.SLF');
expect(result).toBe(true);
});
});

0 comments on commit 6d01b7b

Please sign in to comment.