Permalink
Browse files

test: remove undefined function

`common.fail()` no longer exists as its functionality is now in
`assert.fail()`. Replace only two instances in the code base with
`assert.fail()`.

PR-URL: #17845
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
  • Loading branch information...
Trott authored and starkwang committed Dec 23, 2017
1 parent 094d92b commit 8331f571edb27491161589f30e88962dfe436c2c
@@ -7,7 +7,7 @@ const timers = require('timers');
const OVERFLOW = Math.pow(2, 31); // TIMEOUT_MAX is 2^31-1
function timerNotCanceled() {
common.fail('Timer should be canceled');
assert.fail('Timer should be canceled');
}
process.on('warning', common.mustCall((warning) => {
@@ -1,6 +1,8 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const http = require('http');
let time = Date.now();
@@ -16,7 +18,7 @@ const server = http.createServer((req, res) => {
req.setTimeout(TIMEOUT, () => {
if (!intervalWasInvoked)
return common.skip('interval was not invoked quickly enough for test');
common.fail('Request timeout should not fire');
assert.fail('Request timeout should not fire');
});
req.resume();

0 comments on commit 8331f57

Please sign in to comment.