Add test for setImmediate and process.nextTick.
This commit is contained in:
parent
5f443ebbb0
commit
1d9fca25dc
1 changed files with 20 additions and 0 deletions
20
spec/node/message_loop.coffee
Normal file
20
spec/node/message_loop.coffee
Normal 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
|
Loading…
Reference in a new issue