Closed
Description
var domain = require('domain').create();
domain.run(function() {
setTimeout(function() { throw Error('FAIL'); }, 1);
setTimeout(function() { console.log('timeout 1'); }, 1);
setTimeout(function() { console.log('timeout 2'); }, 2);
});
domain.once('error', function() {});
Expected output:
timeout 1
timeout 2
Actual output:
timeout 2
timeout 1
(EDIT: I forgot to mention that you may need to run the test a few times.)