Files
learn_enough_javascript_cod…/Listing_8.5.js
T
2022-01-12 14:58:42 -08:00

23 lines
608 B
JavaScript

let assert = require("assert");
let Phrase = require("../index.js");
describe("Phrase", function() {
describe("#palindrome", function() {
it("should return false for a non-palindrome", function() {
let nonPalindrome = new Phrase("apple");
assert(!nonPalindrome.palindrome());
});
it("should return true for a plain palindrome", function() {
let plainPalindrome = new Phrase("racecar");
assert(plainPalindrome.palindrome());
});
it("should return true for a mixed-case palindrome");
it("should return true for a palindrome with punctuation");
});
});