Skip to content

In this repo I try out testing JavaScript functions with Jest

Notifications You must be signed in to change notification settings

Osong-Michael/JS-Testing-Practice

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn

JavaScript Testing Practice

The aim of this project was to learn how to test JavaScript modules/functions.


Functions Tested

  • analyze(array) takes an array of numbers and returns an object with properties for average, min, max, and length of the given array.

  • capitalize(string) takes a string and returns that string with the first letter capitalized.

  • Calculator()

    • Calculator.add(a, b) takes two numbers and returns the sum.
    • Calculator.subtract(a, b) takes two numbers and returns the difference.
    • Calculator.multiply(a, b) takes two numbers and returns the product.
    • Calculator.divide(a, b) takes two numbers and returns the quotient.
  • cipher(string) Takes a string and either encrypts or decrytps it based on the user's needs. ​

  • reverseString(string) takes a string and returns it reversed.


Contact

👤 Osong Agberndifor


Show your support

Give a ⭐️ if you like this project!

About

In this repo I try out testing JavaScript functions with Jest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published