diff --git a/spec/node/message_loop.coffee b/spec/node/message_loop.coffee new file mode 100644 index 000000000000..a934814c73af --- /dev/null +++ b/spec/node/message_loop.coffee @@ -0,0 +1,20 @@ +assert = require 'assert' + +describe 'message loop', -> + describe 'process.nextTick', -> + it 'should emit the callback', (done) -> + process.nextTick done + + it 'should work in nested calls', (done) -> + process.nextTick -> + process.nextTick -> + process.nextTick done + + describe 'setImmediate', -> + it 'should emit the callback', (done) -> + setImmediate done + + it 'should work in nested calls', (done) -> + setImmediate -> + setImmediate -> + setImmediate done