Skip to content

Commit

Permalink
test: remove undefined function
Browse files Browse the repository at this point in the history
`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 <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jan 9, 2018
1 parent ca35d08 commit 9110654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-timers-max-duration-warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 3 additions & 1 deletion test/sequential/test-http-server-consumed-timeout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const common = require('../common');

const assert = require('assert');
const http = require('http');

let time = Date.now();
Expand All @@ -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();
Expand Down

0 comments on commit 9110654

Please sign in to comment.