Ruben Bridgewater
e038d6a1cd
test: refactor common.expectsError
...
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.
The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.
This has the side effect that `common` is used significantly less
frequent.
PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-12-31 15:54:20 +01:00
..
2019-12-25 23:11:02 +01:00
2019-11-12 17:19:22 -08:00
2018-06-06 19:44:11 +02:00
2019-05-20 09:33:10 -04:00
2019-06-17 10:18:09 +08:00
2018-04-01 22:33:13 +08:00
2017-12-12 21:14:43 -08:00
2019-03-27 17:20:06 +01:00
2019-03-27 17:20:06 +01:00
2019-02-28 18:31:10 +01:00
2019-03-27 17:20:06 +01:00
2017-05-02 07:50:16 +02:00
2019-09-30 18:56:17 -07:00
2019-02-28 10:06:42 +05:30
2018-03-14 22:28:18 -07:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-06-16 23:42:58 +08:00
2019-12-31 15:54:20 +01:00
2018-07-15 22:50:16 -07:00
2019-02-02 05:45:05 +08:00
2017-08-27 21:14:34 -03:00
2019-03-10 00:44:40 +01:00
2019-02-28 18:31:10 +01:00
2018-07-28 00:35:08 -04:00
2018-10-15 12:00:00 +02:00
2018-03-08 10:37:29 -06:00
2019-12-25 23:11:02 +01:00
2018-10-01 21:48:00 -07:00
2019-05-26 22:18:00 +02:00
2019-04-12 17:16:46 -04:00
2019-12-31 15:54:20 +01:00
2019-03-20 09:50:52 -07:00
2019-12-31 15:54:20 +01:00
2018-03-19 10:17:58 -07:00
2018-03-16 10:26:55 -07:00
2019-08-10 19:22:11 -07:00
2018-09-16 20:37:30 -07:00
2019-02-28 18:31:10 +01:00
2017-12-18 09:58:02 -05:00
2019-03-27 17:20:06 +01:00
2018-03-08 10:37:43 -06:00
2019-10-10 11:59:31 -07:00
2017-07-22 07:53:27 +03:00
2017-07-22 07:53:27 +03:00
2019-03-24 07:56:25 -07:00
2017-12-18 09:58:02 -05:00
2019-12-08 21:05:59 -08:00
2018-12-10 17:07:18 +01:00
2019-03-07 17:43:21 +01:00
2019-11-25 21:33:13 -08:00
2019-10-10 11:59:31 -07:00
2019-03-07 17:43:21 +01:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-12-25 23:11:02 +01:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2018-11-03 18:35:04 -07:00
2019-10-10 11:59:31 -07:00
2019-02-02 05:41:45 +08:00
2019-07-09 16:50:59 -04:00
2019-10-10 11:59:31 -07:00
2019-12-31 15:54:20 +01:00
2019-10-10 11:59:31 -07:00
2019-11-12 17:19:22 -08:00
2018-07-19 08:47:28 +02:00
2019-12-31 15:54:20 +01:00
2018-01-24 13:16:09 +01:00
2018-09-14 08:32:08 -07:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2017-11-21 07:49:29 -08:00
2019-10-10 11:59:31 -07:00
2019-10-10 11:59:31 -07:00
2019-06-01 10:01:15 -04:00
2017-05-09 13:25:05 -07:00
2019-11-08 15:53:36 +01:00
2019-04-27 08:21:51 +02:00
2018-08-28 00:00:18 +02:00
2017-11-22 16:48:04 +02:00
2019-03-10 00:44:40 +01:00
2017-09-10 23:56:30 -03:00
2018-10-15 12:08:04 +02:00
2018-03-08 10:37:29 -06:00
2019-12-03 12:58:38 -08:00
2017-05-31 22:09:54 -07:00
2018-12-17 17:14:35 +01:00
2019-12-31 15:54:20 +01:00
2019-12-31 15:54:20 +01:00
2018-10-14 22:29:45 +02:00
2017-10-12 18:18:39 -07:00
2019-03-10 00:44:40 +01:00
2018-01-17 08:50:02 +08:00
2019-12-04 23:30:25 -05:00
2017-11-12 10:29:45 -08:00
2019-03-27 17:20:06 +01:00
2019-12-06 22:03:00 -05:00
2019-12-06 22:03:00 -05:00
2019-12-06 22:03:00 -05:00
2019-06-10 09:56:55 -07:00
2019-12-31 15:54:20 +01:00
2019-12-25 12:24:42 +01:00
2019-06-10 09:57:28 -07:00
2019-06-10 09:57:28 -07:00
2019-12-25 11:09:16 +01:00
2018-04-25 23:46:08 +08:00
2019-11-26 10:17:04 -08:00
2014-12-17 20:45:02 +07:00