Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.54 KB

README.md

File metadata and controls

48 lines (30 loc) · 1.54 KB

Jest Testing

This repository is intended as a teaching resource to teach the Jest JavaScript testing framework.

Setup

From the project directory, install the necessary dependency (jest)

$ npm install -g jest-cli
$ npm install

Running the test suite

Run the test suite from the exercise directory with:

$ npm test

Most of the tests are stubbed out and incomplete. In the course of the exercise complete the tests.

Problem Description #1 Pangram

Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the alphabet at least once. The best known English pangram is:

The quick brown fox jumps over the lazy dog.

The alphabet used consists of ASCII letters a to z, inclusive, and is case insensitive. Input will not contain non-ASCII symbols.

Problem Description #2 Palindrome

For the next function write a method which will determine if the input string is a palindrome. A Palindrome is a word or phrase which is spelled the same backwards as forwards.

Example: racecar spelled backwards is: racecar.

The isPalindrome method should work ignoring whitespace or punctuation, so "Too hot to hoot." is a palindrome.

Source

This was adapted from the Exercism JavaScript exercise.