Skip to content

Commit 3d981b5

Browse files
mk-pmbcalvinmetcalf
authored andcommitted
[doc] Explain relation to node.js and the CJS UT spec. (#28)
Kept the package version in case you prefer to increase it via npm, and/or rename the repo before next release. Fixes #27.
1 parent f8975ca commit 3d981b5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

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

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

7-
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)
7+
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.
8+
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.
89

910
## assert.fail(actual, expected, message, operator)
1011
Throws an exception that displays the values for actual and expected separated by the provided operator.

assert.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ function isBuffer(b) {
4141
}
4242

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

4547
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
4648
//

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "assert",
3-
"description": "commonjs assert - node.js api compatible",
3+
"description": "The node.js assert module, re-packaged for web browsers.",
44
"keywords": [
5-
"assert"
5+
"assert",
6+
"browser"
67
],
78
"version": "1.4.1",
89
"homepage": "https://github.com/defunctzombie/commonjs-assert",

0 commit comments

Comments
 (0)