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:
cjihrig 2017-01-19 11:18:51 -05:00
parent a647d82f83
commit aa0e4f3843
19 changed files with 34 additions and 67 deletions

View file

@ -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() {
};