Files
node/lib
Ruben Bridgewater 560925fe22 assert: make sure throws is able to handle primitives
This fixes some possible issues with `assert.throws` and
`assert.rejects` in combination with an validation object. It will
now properly handle primitive values being thrown as error.

It also makes sure the `generatedMessage` property is properly set
if `assert.throws` or `assert.rejects` is used in combination with
an validation object and improves the error performance in such cases
by only creating the error once.

In addition it will fix detecting regular expressions from a different
context such as n-api that are passed through as validator for
`assert.throws` or `assert.rejects`. Until now those were not tested.

PR-URL: https://github.com/nodejs/node/pull/20482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-05-10 14:14:23 +02:00
..
2018-04-13 19:59:44 +02:00
2018-03-05 19:51:30 +01:00
2018-04-05 04:46:26 +08:00
2018-04-14 10:55:35 -07:00
2018-05-07 19:47:42 -04:00
2017-08-28 00:39:42 +04:00
2018-05-09 10:26:05 +02:00
2018-04-03 13:57:41 -07:00
2016-10-04 12:17:32 -04:00
2018-03-05 19:51:30 +01:00
2018-05-05 13:39:11 +02:00
2018-04-16 16:02:12 +02:00
2017-03-10 11:23:48 -08:00
2018-05-02 22:32:24 -07:00
2018-04-05 04:46:26 +08:00
2018-05-03 15:33:58 -03:00
2018-04-26 19:42:48 +02:00