Skip to content

Commit 1bb2a69

Browse files
13_palindromes: Add odd/even-length tests (#659)
1 parent f3914e4 commit 1bb2a69

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

foundations/13_palindromes/palindromes.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
const palindromes = require('./palindromes')
22

33
describe('palindromes', () => {
4-
test('detects palindrome', () => {
4+
test('detects odd-length palindrome', () => {
55
expect(palindromes('racecar')).toBe(true);
66
});
7+
test.skip('detects even-length palindrome', () => {
8+
expect(palindromes('abba')).toBe(true);
9+
});
710
test.skip('detects palindrome with numbers', () => {
811
expect(palindromes('rac3e3car')).toBe(true);
912
});

foundations/13_palindromes/solution/palindromes-solution.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
const palindromes = require('./palindromes-solution');
22

33
describe('palindromes', () => {
4-
test('detects palindrome', () => {
4+
test('detects odd-length palindrome', () => {
55
expect(palindromes('racecar')).toBe(true);
66
});
7+
test('detects even-length palindrome', () => {
8+
expect(palindromes('abba')).toBe(true);
9+
});
710
test('detects palindrome with numbers', () => {
811
expect(palindromes('rac3e3car')).toBe(true);
912
});

0 commit comments

Comments
 (0)