mirror of https://github.com/lukechilds/node.git
Browse Source
Many tests use assert.fail(null, null, msg) where it would be simpler to use common.fail(msg). This is largely because common.fail() is fairly new. This commit makes the replacement when applicable. PR-URL: https://github.com/nodejs/node/pull/7735 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>v4.x
cjihrig
9 years ago
committed by
Myles Borins
25 changed files with 46 additions and 56 deletions
@ -1,8 +1,7 @@ |
|||||
'use strict'; |
'use strict'; |
||||
const common = require('../common'); |
const common = require('../common'); |
||||
const assert = require('assert'); |
|
||||
const net = require('net'); |
const net = require('net'); |
||||
|
|
||||
const socket = net.connect(common.PORT, common.localhostIPv4, assert.fail); |
const socket = net.connect(common.PORT, common.localhostIPv4, common.fail); |
||||
socket.on('error', assert.fail); |
socket.on('error', common.fail); |
||||
socket.destroy(); |
socket.destroy(); |
||||
|
@ -1,9 +1,8 @@ |
|||||
'use strict'; |
'use strict'; |
||||
var assert = require('assert'); |
|
||||
var common = require('../common'); |
var common = require('../common'); |
||||
|
|
||||
process.on('beforeExit', common.mustCall(function() { |
process.on('beforeExit', common.mustCall(function() { |
||||
setTimeout(assert.fail, 5); |
setTimeout(common.fail, 5); |
||||
process.exit(0); // Should execute immediately even if we schedule new work.
|
process.exit(0); // Should execute immediately even if we schedule new work.
|
||||
assert.fail(); |
common.fail(); |
||||
})); |
})); |
||||
|
Loading…
Reference in new issue