Skip to content

aldoignatachandra/Javascript-SimpleUnitTesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple Unit Testing Using Mocha And Chai

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published