An open API service indexing awesome lists of open source software.

https://github.com/aldoignatachandra/javascript-simpleunittesting

Simple Unit Testing Using Mocha And Chai
https://github.com/aldoignatachandra/javascript-simpleunittesting

javascript mocha-chai unittesting

Last synced: 5 months ago
JSON representation

Simple Unit Testing Using Mocha And Chai

Awesome Lists containing this project

README

          

Simple Unit Testing
( Javascript )













This repository contains unit testing in javscript using mocha and chai in a simple way to understand about unit testing. This repository contains unit testing use for two different testing, using express (endpoint server) & pure javascript without express

## Requirments

- **yarn** v1.17+
- **NodeJS** v8+

## Features

#### Folder Server (With Express)

1. Unit Testing End Point '/' (Check String Response)
2. Unit Testing End Point '/user' (Check Member In Array)
3. Unit Testing End Point '/users' (Check Member In Array of Object)

#### Folder Utils (Without Express)

1. Unit Test Add Function (Two Number)
2. Unit Test Async Add Function (Two Number)
3. Unit Test Square Function (One Number)
4. Unit Test Async Square Function (One Number)

## Installation

for ( Local Version ) :

1. Clone or download this repository
2. Install the dependencies by running `yarn install`
3. Make sure you have global installation nodemon in your computer, if not you can install in your project using `yarn add nodemon`
4. Start the code using `yarn test-watching`

## License

[ISC](https://en.wikipedia.org/wiki/ISC_license "ISC")