Skip to content

Commit

Permalink
doc: remove superfluous sample assert code
Browse files Browse the repository at this point in the history
Remove superfluous sample code. Since `assert()` is documented as an
alias of `assert.ok()` and nothing more, the sample code for
`assert.ok()` is sufficient.

PR-URL: #11933
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Mar 28, 2017
1 parent 0f2642e commit 96ad336
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,7 @@ added: v0.5.9
* `value` {any}
* `message` {any}

An alias of [`assert.ok()`][] .

```js
const assert = require('assert');

assert(true);
// OK
assert(1);
// OK
assert(false);
// throws "AssertionError: false == true"
assert(0);
// throws "AssertionError: 0 == true"
assert(false, 'it\'s false');
// throws "AssertionError: it's false"
```
An alias of [`assert.ok()`][].

## assert.deepEqual(actual, expected[, message])
<!-- YAML
Expand Down

0 comments on commit 96ad336

Please sign in to comment.