Skip to content

Instantly share code, notes, and snippets.

@hayes
Created October 23, 2014 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayes/e421f461011600173085 to your computer and use it in GitHub Desktop.
Save hayes/e421f461011600173085 to your computer and use it in GitHub Desktop.
'use strict';
var test = require('tap').test;
var tracer = require('tracing')
test("async listener lifecycle", function (t) {
t.plan(1);
var count = 0
setTimeout(function() {
tracer.addAsyncListener({
create : function () { count++ }
});
}, 0);
setTimeout(function() {
process.nextTick(function() {
t.equal(count, 0)
t.end()
})
}, 15)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment