0.1.1 • Published 3 years ago

universal-tester v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Universal Tester

Create a simple test report for node js

Installation

npm i universal-tester

Usage

const Tester = require('universal-tester');
let tester = new Tester();

test(functionOutput, expectedOutput, functionName)

Add tests to tester class

functionOutput - output of the function

expectedOutput - expected output of the function

functionName - name of the function

function helloWorld(){
  return 'Hello, World!';
}

tester.test(helloWorld(), 'Hello, World!', 'helloWorld');

printResults()

Prints test results. For passed tests, "PASSED" is printed with the test number and function that was run. For failed tests, "FAILED" is printed with test number, function name, as well as the outputs.

Test 1 (helloWorld)  PASSED


1/1 tests passed
0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago