Don't set interval too short.

Otherwise it could be possible that the callback executes for multiple
times before it is cleared.
This commit is contained in:
Cheng Zhao 2014-08-07 19:40:41 +08:00
parent 3c078b4dab
commit 424a00cf29

View file

@ -74,7 +74,7 @@ describe 'node feature', ->
clear = ->
remote.getGlobal('clearInterval')(interval)
done()
interval = remote.getGlobal('setInterval')(clear, 0)
interval = remote.getGlobal('setInterval')(clear, 10)
describe 'message loop', ->
describe 'process.nextTick', ->