Skip to content

Commit 8331f57

Browse files
Trottstarkwang
authored andcommitted
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>
1 parent 094d92b commit 8331f57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/parallel/test-timers-max-duration-warning.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const timers = require('timers');
77
const OVERFLOW = Math.pow(2, 31); // TIMEOUT_MAX is 2^31-1
88

99
function timerNotCanceled() {
10-
common.fail('Timer should be canceled');
10+
assert.fail('Timer should be canceled');
1111
}
1212

1313
process.on('warning', common.mustCall((warning) => {

test/sequential/test-http-server-consumed-timeout.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

33
const common = require('../common');
4+
5+
const assert = require('assert');
46
const http = require('http');
57

68
let time = Date.now();
@@ -16,7 +18,7 @@ const server = http.createServer((req, res) => {
1618
req.setTimeout(TIMEOUT, () => {
1719
if (!intervalWasInvoked)
1820
return common.skip('interval was not invoked quickly enough for test');
19-
common.fail('Request timeout should not fire');
21+
assert.fail('Request timeout should not fire');
2022
});
2123

2224
req.resume();

0 commit comments

Comments
 (0)