Giter VIP home page Giter VIP logo

js-testing's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.