forked from mushmelow/basic-javascript-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathisPalindrome.js
More file actions
21 lines (16 loc) · 702 Bytes
/
Copy pathisPalindrome.js
File metadata and controls
21 lines (16 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var expect = require('chai').expect;
var isPalindrome = require('../workshop').isPalindrome;
describe('isPalindrome', function() {
it('Should return true when passed "radar"', function() {
expect(isPalindrome('radar')).to.equal(true);
});
it('Should return true when passed empty string', function() {
expect(isPalindrome('')).to.equal(true);
});
it('Should return false when passed "javascript"', function() {
expect(isPalindrome('javascript')).to.equal(false);
});
it('Should return true even if the palindrome contains other characters', function() {
expect(isPalindrome('A man, a plan, a canal - Panama')).to.equal(true);
});
});