diff --git a/foundations/13_palindromes/palindromes.spec.js b/foundations/13_palindromes/palindromes.spec.js index 90d53e49a91..084edf35557 100644 --- a/foundations/13_palindromes/palindromes.spec.js +++ b/foundations/13_palindromes/palindromes.spec.js @@ -1,28 +1,25 @@ const palindromes = require('./palindromes') describe('palindromes', () => { - test('works with single words', () => { + test('detects palindrome', () => { expect(palindromes('racecar')).toBe(true); }); - test.skip('works with punctuation ', () => { - expect(palindromes('racecar!')).toBe(true); - }); - test.skip('works with upper-case letters ', () => { - expect(palindromes('Racecar!')).toBe(true); + test.skip('detects palindrome with numbers', () => { + expect(palindromes('rac3e3car')).toBe(true); }); - test.skip('works with multiple words', () => { + test.skip('detects palindrome with multiple words', () => { expect(palindromes('A car, a man, a maraca.')).toBe(true); }); - test.skip('works with multiple words', () => { - expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe(true); + test.skip('ignores punctuation', () => { + expect(palindromes('racecar!')).toBe(true); }); - test.skip('doesn\'t just always return true', () => { - expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false); + test.skip('is case insensitive', () => { + expect(palindromes('Racecar!')).toBe(true); }); - test.skip('works with numbers in a string', () => { - expect(palindromes('rac3e3car')).toBe(true); + test.skip('detects non-palindromes', () => { + expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false); }); - test.skip('works with unevenly spaced numbers in a string', () => { + test.skip('detects non-palindromes with numbers', () => { expect(palindromes('r3ace3car')).toBe(false); }); }); diff --git a/foundations/13_palindromes/solution/palindromes-solution.spec.js b/foundations/13_palindromes/solution/palindromes-solution.spec.js index 6e31d917e6a..6d67738bea4 100644 --- a/foundations/13_palindromes/solution/palindromes-solution.spec.js +++ b/foundations/13_palindromes/solution/palindromes-solution.spec.js @@ -1,30 +1,25 @@ const palindromes = require('./palindromes-solution'); describe('palindromes', () => { - test('works with single words', () => { + test('detects palindrome', () => { expect(palindromes('racecar')).toBe(true); }); - test('works with punctuation ', () => { - expect(palindromes('racecar!')).toBe(true); - }); - test('works with upper-case letters ', () => { - expect(palindromes('Racecar!')).toBe(true); + test('detects palindrome with numbers', () => { + expect(palindromes('rac3e3car')).toBe(true); }); - test('works with multiple words', () => { + test('detects palindrome with multiple words', () => { expect(palindromes('A car, a man, a maraca.')).toBe(true); }); - test('works with multiple words', () => { - expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe( - true - ); + test('ignores punctuation', () => { + expect(palindromes('racecar!')).toBe(true); }); - test("doesn't just always return true", () => { - expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false); + test('is case insensitive', () => { + expect(palindromes('Racecar!')).toBe(true); }); - test('works with numbers in a string', () => { - expect(palindromes('rac3e3car')).toBe(true); + test('detects non-palindromes', () => { + expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false); }); - test('works with unevenly spaced numbers in a string', () => { + test('detects non-palindromes with numbers', () => { expect(palindromes('r3ace3car')).toBe(false); }); });