Permalink
Browse files

cleanup

  • Loading branch information...
1 parent 3fb2f51 commit 242fad0b0f833f9c50cda951d4eefbd5c2fd433d @maxtaco committed with Dec 4, 2011
Showing with 6 additions and 5 deletions.
  1. +6 −5 test/tame.coffee
View
@@ -1,20 +1,21 @@
-delay = (cb) ->
- setTimeout cb, 10
+delay = (cb, i) ->
+ i = i || 10
+ setTimeout cb, i
atest "basic tame waiting", (cb) ->
i = 1
- await setTimeout(defer(), 10)
+ await delay defer()
i++
cb(i == 2, {})
foo = (i, cb) ->
- await setTimeout(defer(), i);
+ await delay(defer(), i)
cb(i)
atest "basic tame waiting", (cb) ->
i = 1
- await setTimeout(defer(), 10)
+ await delay defer()
i++
cb(i == 2, {})

0 comments on commit 242fad0

Please sign in to comment.