Browse Source

doc: update the assert module summary

The current wording "This module is used for writing unit tests for your
applications, you can access it with require('assert')." implies that
this module should only be used in development while unit testing.

The article "Error Handling in Node.js" by Joyent
(https://www.joyent.com/developers/node/design/errors) uses the assert
module in an efficient way to validate required function arguments.

PR-URL: https://github.com/nodejs/node/pull/2799
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
v5.x
David Boivin 9 years ago
committed by Roman Reiss
parent
commit
8e213096df
  1. 4
      doc/api/assert.markdown

4
doc/api/assert.markdown

@ -2,8 +2,8 @@
Stability: 2 - Stable
This module is used for writing unit tests for your applications. You can
access it with `require('assert')`.
This module is used for writing assertion tests. You can access it with
`require('assert')`.
## assert.fail(actual, expected, message, operator)

Loading…
Cancel
Save