Files
node/lib
Ruben Bridgewater a25f56730e 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-13 19:56:33 +02:00
..
2018-03-25 03:01:45 +02:00
2018-04-07 10:03:22 +02:00
2018-04-13 19:56:33 +02:00
2018-03-05 19:51:30 +01:00
2018-04-05 04:46:26 +08:00
2018-04-05 19:29:02 +02:00
2017-08-28 00:39:42 +04:00
2018-04-05 04:46:26 +08:00
2018-04-03 13:57:41 -07:00
2018-03-05 19:51:30 +01:00
2018-03-15 20:50:35 +08:00
2018-04-05 04:46:26 +08:00
2018-04-12 23:23:53 +02:00
2018-04-03 17:59:22 +02:00