mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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:
1 parent
ca35d08291
commit
9110654965
2 files changed
+4
-2
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user