Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1 KB

README.md

File metadata and controls

42 lines (27 loc) · 1 KB

rJS Testing

Context-based, (a)sync-uniform testing framework for JavaScript and TypeScript.

📖   Read the Docs

npm install -D @rapidjs.org/testing
function divide(a, b) {
  if(b === 0) throw new SyntaxError("Division by zero");
  return a / b;
}

new UnitTest("Computes quotient of positive integers")
.actual(divide(4, 2))
.expected(2);

new UnitTest("Throws error for division by zero")
.actual(() => divide(2, 0))
.error("Division by zero", SyntaxError);

🔧   Testing Suites

🔩   Unitunit

Test arbitrary units of code based on deep expected value comparisons.

🔩   HTTPhttp

Test HTTP(S) endpoints based on expectation filtered responses.

🔩   CLIcli

Test command line interfaces based on expected stdout or stderr.

© Thassilo Martin Schiepanski