Files
node/lib/internal
Ruben Bridgewater 1964978fb8 assert: detect faulty throws usage
One of the biggest downsides to the `assert.throws` API is that it
does not check for the error message in case that is used as second
argument. It will instead be used in case no error is thrown.

This improves the situation by checking the actual error message
against the provided one and throws an error in case they are
identical. It is very unlikely that the user wants to use that error
message as information instead of checking against that message.

PR-URL: https://github.com/nodejs/node/pull/19867
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-16 16:11:01 -07:00
..
2018-04-06 13:02:43 +02:00
2017-11-16 15:42:46 -08:00
2018-03-30 19:41:41 -05:00
2018-04-16 16:11:01 -07:00
2018-03-30 14:20:40 +02:00
2017-08-14 15:43:10 -04:00
2018-02-16 18:09:56 +01:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These are subject to change at any time. Reliance on these modules outside of core is not supported in any way.