From 50c88e0ff24890cadf2f1730a0eb93ebd0a63c28 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Thu, 21 Feb 2013 12:54:13 -0800 Subject: [PATCH] test: modify async native test.js to test for #4820 --- test/addons/async-hello-world/test.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/addons/async-hello-world/test.js b/test/addons/async-hello-world/test.js index 535d1ab797..83f5e7206e 100644 --- a/test/addons/async-hello-world/test.js +++ b/test/addons/async-hello-world/test.js @@ -1,7 +1,15 @@ var assert = require('assert'); var binding = require('./build/Release/binding'); +var called = false; + +process.on('exit', function () { + assert(called); +}); + binding(5, function (err, val) { assert.equal(null, err); assert.equal(10, val); - console.error('done :)'); + process.nextTick(function () { + called = true; + }); });