Unit Test - Alvi4142/CSE327 GitHub Wiki

Unit Testing using Jest Framework

Installation Process

For installation, go to the given link
Jest Framework Jest Setup

Overview

Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests with an approachable, familiar and feature-rich API that gives you results quickly.

Test Case

A test case is the individual unit of testing. It checks for a specific response to a particular set of inputs. Jest provides a 'test()' function, which may be used to create new test cases.

Hospital Search Unit Test(by Mainuzzaman)

Unit code:

Output:

login Unit Test(by Nusrat)

Unit code:

Output:

getprescription Unit Test(by Sabit)

Unit code:

Output: Fail

Medicine Search Unit Test(by Sajid)

Unit code:

Output:

view appointment Unit Test(by Tamzid)

Unit code: failed

Output: