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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
094d92bb57
commit
8331f571ed
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user