Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for palindromes #210

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for palindrome()
ocnly committed Sep 19, 2018
commit 31622e2bdfc98bdf9d889c11471f9a5c9a97c764
8 changes: 8 additions & 0 deletions src/algorithms/string/palindrome/__true__/palindrome.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import palindrome from '../palindrome';

describe('palindrome', () => {
it('should return true if word is a palindrome', () => {
expect(palindrome('racecar').toBe(true);
expect(palindrome('car').toBe(false);
}
}