summaryrefslogtreecommitdiff
path: root/test/addons/async-hello-world/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/addons/async-hello-world/test.js')
-rw-r--r--test/addons/async-hello-world/test.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/addons/async-hello-world/test.js b/test/addons/async-hello-world/test.js
index 14b80b711b..2ed003e444 100644
--- a/test/addons/async-hello-world/test.js
+++ b/test/addons/async-hello-world/test.js
@@ -1,17 +1,10 @@
'use strict';
-require('../../common');
+const common = require('../../common');
var assert = require('assert');
var binding = require('./build/Release/binding');
-var called = false;
-process.on('exit', function() {
- assert(called);
-});
-
-binding(5, function(err, val) {
+binding(5, common.mustCall(function(err, val) {
assert.equal(null, err);
assert.equal(10, val);
- process.nextTick(function() {
- called = true;
- });
-});
+ process.nextTick(common.mustCall(function() {}));
+}));