Skip to content

Commit

Permalink
doc: update the assert module summary
Browse files Browse the repository at this point in the history
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: nodejs#2799
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
daveboivin authored and Trott committed Oct 12, 2015
1 parent fd8f76f commit 9c75020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/assert.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9c75020

Please sign in to comment.