forked from TheOdinProject/javascript-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpalindromes.spec.js
More file actions
25 lines (24 loc) · 844 Bytes
/
palindromes.spec.js
File metadata and controls
25 lines (24 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const palindromes = require('./palindromes')
describe('palindromes', () => {
test('detects palindrome', () => {
expect(palindromes('racecar')).toBe(true);
});
test.skip('detects palindrome with numbers', () => {
expect(palindromes('rac3e3car')).toBe(true);
});
test.skip('detects palindrome with multiple words', () => {
expect(palindromes('A car, a man, a maraca.')).toBe(true);
});
test.skip('ignores punctuation', () => {
expect(palindromes('racecar!')).toBe(true);
});
test.skip('is case insensitive', () => {
expect(palindromes('Racecar!')).toBe(true);
});
test.skip('detects non-palindromes', () => {
expect(palindromes('ZZZZ car, a man, a maracaz.')).toBe(false);
});
test.skip('detects non-palindromes with numbers', () => {
expect(palindromes('r3ace3car')).toBe(false);
});
});