Skip to content

Commit

Permalink
[doc] Explain relation to node.js and the CJS UT spec. (#28)
Browse files Browse the repository at this point in the history
Kept the package version in case you prefer to increase it via npm,
and/or rename the repo before next release.

Fixes #27.
  • Loading branch information
mk-pmb authored and calvinmetcalf committed Oct 26, 2016
1 parent f8975ca commit 3d981b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

[![Build Status](https://travis-ci.org/defunctzombie/commonjs-assert.svg?branch=master)](https://travis-ci.org/defunctzombie/commonjs-assert)

This module is used for writing unit tests for your applications, you can access it with require('assert').
This module is used for writing unit tests for your applications, you can access it with `require('assert')`.

The API is derived from the [commonjs 1.0 unit testing](http://wiki.commonjs.org/wiki/Unit_Testing/1.0) spec and the [node.js assert module](http://nodejs.org/api/assert.html)
It aims to be fully compatibe with the [node.js assert module](http://nodejs.org/api/assert.html), same API and same behavior, just adding support for web browsers.
The API and code may contain traces of the [CommonJS Unit Testing 1.0 spec](http://wiki.commonjs.org/wiki/Unit_Testing/1.0) which they were based on, but both have evolved significantly since then.

## assert.fail(actual, expected, message, operator)
Throws an exception that displays the values for actual and expected separated by the provided operator.
Expand Down
2 changes: 2 additions & 0 deletions assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function isBuffer(b) {
}

// based on node assert, original notice:
// NB: The URL to the CommonJS spec is kept just for tradition.
// node-assert has evolved a lot since then, both in API and behavior.

// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "assert",
"description": "commonjs assert - node.js api compatible",
"description": "The node.js assert module, re-packaged for web browsers.",
"keywords": [
"assert"
"assert",
"browser"
],
"version": "1.4.1",
"homepage": "https://github.com/defunctzombie/commonjs-assert",
Expand Down

0 comments on commit 3d981b5

Please sign in to comment.