Browse Source

test: modify async native test.js to test for #4820

v0.9.11-release
Nathan Rajlich 12 years ago
parent
commit
50c88e0ff2
  1. 10
      test/addons/async-hello-world/test.js

10
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;
});
});

Loading…
Cancel
Save