summaryrefslogtreecommitdiff
path: root/test/parallel/test-domain-uncaught-exception.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-01-19 11:18:51 -0500
committercjihrig <cjihrig@gmail.com>2017-01-23 09:45:58 -0500
commitaa0e4f38433cf2ca62fbb736c727cd65c99a96db (patch)
treef00b3c3027451f5aabf91aa9502b8bd450475cb4 /test/parallel/test-domain-uncaught-exception.js
parenta647d82f83ad5ddad5db7be2cc24c3d686121792 (diff)
downloadandroid-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.tar.gz
android-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.tar.bz2
android-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.zip
test: use common.fail() instead of assert(false)
PR-URL: https://github.com/nodejs/node/pull/10899 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-domain-uncaught-exception.js')
-rw-r--r--test/parallel/test-domain-uncaught-exception.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/parallel/test-domain-uncaught-exception.js b/test/parallel/test-domain-uncaught-exception.js
index 58df4ac59a..b13bf79b1a 100644
--- a/test/parallel/test-domain-uncaught-exception.js
+++ b/test/parallel/test-domain-uncaught-exception.js
@@ -9,7 +9,6 @@
*/
const common = require('../common');
-const assert = require('assert');
const domain = require('domain');
const child_process = require('child_process');
@@ -184,17 +183,16 @@ if (process.argv[2] === 'child') {
test.expectedMessages.forEach(function(expectedMessage) {
if (test.messagesReceived === undefined ||
test.messagesReceived.indexOf(expectedMessage) === -1)
- assert(false, 'test ' + test.fn.name +
- ' should have sent message: ' + expectedMessage +
- ' but didn\'t');
+ common.fail('test ' + test.fn.name + ' should have sent message: ' +
+ expectedMessage + ' but didn\'t');
});
if (test.messagesReceived) {
test.messagesReceived.forEach(function(receivedMessage) {
if (test.expectedMessages.indexOf(receivedMessage) === -1) {
- assert(false, 'test ' + test.fn.name +
- ' should not have sent message: ' + receivedMessage +
- ' but did');
+ common.fail('test ' + test.fn.name +
+ ' should not have sent message: ' + receivedMessage +
+ ' but did');
}
});
}