Commit Graph

16 Commits (58a612ea9d2ede45d138174987fd8fae37f5d5d3)

Author SHA1 Message Date
Andrei Sedoi 8c1df7a8a8 doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-13 13:37:24 -05:00
Vladimir Kurchatkin 3f473ef141 assert: introduce `deepStrictEqual`
`deepStrictEqual` works the same way as `strictEqual`, but
uses `===` to compare primitives and requires prototypes of
equal objects to be the same object.

Fixes: https://github.com/joyent/node/issues/7161
Fixes: https://github.com/iojs/io.js/issues/620
PR-URL: https://github.com/iojs/io.js/pull/639
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-02-09 14:14:20 +03:00
Trevor Norris f2a78de6ec doc: fix optional parameter parsing
The parameter parser specifically looked for the old bracket syntax.
This generated a lot of warnings when building the docs. Those warnings
have been fixed by changing the parsing logic.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 16:32:34 -07:00
Trevor Norris 51b6b6844e doc: fix brackets for optional parameters
Documentation incorrectly used bracket notation for optional parameters.
This caused inconsistencies in usage because of examples like the
following:

    fs.write(fd, data[, position[, encoding]], callback)

This simply fixes all uses of bracket notation in documentation.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-25 11:26:15 -07:00
Nicolas Talle 1efe6837b2 doc: update assert.markdown
Update assert.throws() and assert.doesNotThrow() docs
2014-02-23 18:09:26 +04:00
Ben Noordhuis e4cef1a083 doc: update assert.doesNotThrow() docs
It takes an optional "expected exception" argument that is not used meaningfully
but is nevertheless documented. Undocument it, it confuses casual readers of the
documentation.

Fixes #3935.
2012-08-29 02:36:22 +02:00
Nao Iizuka f8ce384446 docs: correct the description of assert.ok() 2012-03-12 02:27:55 +01:00
isaacs 2d44dcc8be doc: Add stability indicators to documentation 2012-03-03 17:03:52 -08:00
isaacs d383954ffe doc refactor: assert 2012-02-29 15:23:00 -08:00
Maciej Małecki f4f037aa64 docs: Update `assert` module docs 2011-10-02 02:25:52 +02:00
Brian White d22259426c Fix incorrect documentation for assert.fail()
Fixes #1100.
2011-05-24 10:44:14 -07:00
Oleg Slobodskoi 23cf938e4f fix assert.throws 2010-12-21 12:41:57 -08:00
Oleg Slobodskoi c5c1dc5dda docs for assert.throws 2010-12-02 11:07:47 -08:00
Silas Sewell 11b2ee7632 Various doc tweaks (2-spaces vs tabs, EOL-whitespace, repl prompt, "world" vs "World", etc...) 2010-11-21 14:33:09 -08:00
Oleg Efimov 8b980d729c Fix line wrapping in docs. Add tics for constants in docs text. 2010-11-18 15:41:15 -08:00
Micheil Smith e190c9616e Splitting documentation 2010-10-28 14:59:15 -07:00