mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: improve async hooks test error messages
Improve error messages in the async hooks tests, mostly by removing unhelpful `message` parameters for assertions. PR-URL: https://github.com/nodejs/node/pull/13243 Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
parent
8741e3c750
commit
1dc3272bb9
36 changed files with 234 additions and 306 deletions
|
@ -26,12 +26,9 @@ const parser = new HTTPParser(REQUEST);
|
|||
const as = hooks.activitiesOfTypes('HTTPPARSER');
|
||||
const httpparser = as[0];
|
||||
|
||||
assert.strictEqual(
|
||||
as.length, 1,
|
||||
'1 httpparser created synchronously when creating new httpparser');
|
||||
assert.strictEqual(typeof httpparser.uid, 'number', 'uid is a number');
|
||||
assert.strictEqual(typeof httpparser.triggerId,
|
||||
'number', 'triggerId is a number');
|
||||
assert.strictEqual(as.length, 1);
|
||||
assert.strictEqual(typeof httpparser.uid, 'number');
|
||||
assert.strictEqual(typeof httpparser.triggerId, 'number');
|
||||
checkInvocations(httpparser, { init: 1 }, 'when created new Httphttpparser');
|
||||
|
||||
parser[kOnHeadersComplete] = common.mustCall(onheadersComplete);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue