|
1 | 1 | const palindromes = require('./palindromes') |
2 | 2 |
|
3 | 3 | describe('palindromes', () => { |
4 | | - test('works with single words', () => { |
| 4 | + test('detects palindrome', () => { |
5 | 5 | expect(palindromes('racecar')).toBe(true); |
6 | 6 | }); |
7 | | - test.skip('works with punctuation ', () => { |
8 | | - expect(palindromes('racecar!')).toBe(true); |
9 | | - }); |
10 | | - test.skip('works with upper-case letters ', () => { |
11 | | - expect(palindromes('Racecar!')).toBe(true); |
| 7 | + test.skip('detects palindrome with numbers', () => { |
| 8 | + expect(palindromes('rac3e3car')).toBe(true); |
12 | 9 | }); |
13 | | - test.skip('works with multiple words', () => { |
| 10 | + test.skip('detects palindrome with multiple words', () => { |
14 | 11 | expect(palindromes('A car, a man, a maraca.')).toBe(true); |
15 | 12 | }); |
16 | | - test.skip('works with multiple words', () => { |
17 | | - expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe(true); |
| 13 | + test.skip('ignores punctuation', () => { |
| 14 | + expect(palindromes('racecar!')).toBe(true); |
18 | 15 | }); |
19 | | - test.skip('doesn\'t just always return true', () => { |
20 | | - expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false); |
| 16 | + test.skip('is case insensitive', () => { |
| 17 | + expect(palindromes('Racecar!')).toBe(true); |
21 | 18 | }); |
22 | | - test.skip('works with numbers in a string', () => { |
23 | | - expect(palindromes('rac3e3car')).toBe(true); |
| 19 | + test.skip('detects non-palindromes', () => { |
| 20 | + expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false); |
24 | 21 | }); |
25 | | - test.skip('works with unevenly spaced numbers in a string', () => { |
| 22 | + test.skip('detects non-palindromes with numbers', () => { |
26 | 23 | expect(palindromes('r3ace3car')).toBe(false); |
27 | 24 | }); |
28 | 25 | }); |
0 commit comments