{"document_url": "https://en.wikipedia.org/wiki/Unit.js"}
Open source testing framework for JavaScript
Unit.js is an open source unit testing framework for the JavaScript programming language, running on Node.js and the browser.

Usage

A simple hello world test looks like the code below.

Support describe() and it(), describes a suite of tests and it() is an individual test specification. The name "it()" follows the idea of behavior-driven development and serves as the first word in the test name, which should be a complete sentence.

Assertion styles

Unit.js has multiple interfaces that allow the developer to choose the most comfortable and productive style.

Unit.js :

Assert :

Must.js :

Should.js :