mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: use common.fail() instead of assert(false)
PR-URL: https://github.com/nodejs/node/pull/10899 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
a647d82f83
commit
aa0e4f3843
19 changed files with 34 additions and 67 deletions
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
const binding = process.binding('http_parser');
|
||||
|
@ -35,9 +35,7 @@ function newParser(type) {
|
|||
parser[kOnHeadersComplete] = function(info) {
|
||||
};
|
||||
|
||||
parser[kOnBody] = function(b, start, len) {
|
||||
assert.ok(false, 'Function should not be called.');
|
||||
};
|
||||
parser[kOnBody] = common.fail;
|
||||
|
||||
parser[kOnMessageComplete] = function() {
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue