Skip to content

Yacoubou-seidou/Testing_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testing-exercise

This is a repository containing a set of unit tests for four basic JavaScript functions: calculator, capitalize, reverseString, and stringLength. These tests were developed using the Jest testing framework.

The calculator function performs basic arithmetic operations (addition, subtraction, multiplication, and division) on two numbers. The capitalize function takes a string and capitalizes its first letter. The reverseString function takes a string and reverses its characters. The stringLength function takes a string and returns its length.

Each function has its own test file, located in the tests directory. These files contain a series of test cases designed to ensure that the function behaves correctly under a variety of conditions. The tests cover typical use cases as well as edge cases and error conditions.

To run the tests, clone the repository and run npm install to install the necessary dependencies. Then, run npm test to execute the tests using Jest.

This repository can be used as a reference for writing unit tests for other JavaScript functions or as a starting point for building a larger test suite for a more complex application.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published