Skip to content

CheezItManSample/js-testing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A resource used in teaching vanilla JavaScript testing using Jest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.6%
  • Dockerfile 21.7%
  • Shell 0.7%