Files
node/test/parallel
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-02-16 16:54:07 +01:00
2018-02-16 16:54:07 +01:00
2018-02-16 16:54:07 +01:00
2018-03-25 01:45:38 +01:00
2018-03-25 01:45:40 +01:00
2018-03-25 01:45:40 +01:00
2018-03-25 01:45:40 +01:00
2018-03-25 01:45:40 +01:00
2017-12-22 12:49:10 -08:00
2018-02-01 13:17:33 +01:00
2018-03-25 01:45:40 +01:00
2018-03-25 01:45:40 +01:00
2018-03-25 01:45:40 +01:00
2018-02-16 16:54:07 +01:00
2018-03-25 01:45:38 +01:00
2018-02-16 16:54:07 +01:00
2017-11-26 08:47:33 -08:00
2017-11-10 14:27:52 -05:00
2018-02-16 16:54:07 +01:00
2018-01-30 17:00:57 -08:00
2018-01-30 17:00:57 -08:00
2018-04-10 00:27:09 +02:00