Add test for setImmediate and process.nextTick.

This commit is contained in:
Cheng Zhao 2013-07-17 17:07:31 +08:00
parent 5f443ebbb0
commit 1d9fca25dc

View file

@ -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