diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-02-12 12:25:04 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-02-16 16:54:57 +0100 |
commit | 15bb8437fd0a0eb07845ccf746c9ecb47fcfcb25 (patch) | |
tree | 3e5fded2ef61ccc4cd7ebbf042d614a9d29eb38c /doc/api/assert.md | |
parent | 644fdd60d4be49ffa66d0bda1702c4459f607635 (diff) | |
download | android-node-v8-15bb8437fd0a0eb07845ccf746c9ecb47fcfcb25.tar.gz android-node-v8-15bb8437fd0a0eb07845ccf746c9ecb47fcfcb25.tar.bz2 android-node-v8-15bb8437fd0a0eb07845ccf746c9ecb47fcfcb25.zip |
tools: add assert.doesNotThrow eslint rule
Prohibit the usage of `assert.doesNotThrow()`.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api/assert.md')
-rw-r--r-- | doc/api/assert.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md index ca414e1c7c..cedbc14d42 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -341,6 +341,7 @@ to the caller. The following, for instance, will throw the [`TypeError`][] because there is no matching error type in the assertion: +<!-- eslint-disable no-restricted-syntax --> ```js assert.doesNotThrow( () => { @@ -353,6 +354,7 @@ assert.doesNotThrow( However, the following will result in an `AssertionError` with the message 'Got unwanted exception (TypeError)..': +<!-- eslint-disable no-restricted-syntax --> ```js assert.doesNotThrow( () => { @@ -366,6 +368,7 @@ If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: +<!-- eslint-disable no-restricted-syntax --> ```js assert.doesNotThrow( () => { |