Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

and another regtest to test the finer points of continue / break

  • Loading branch information...
commit 3fb2f51aa04e5fb9d30cb7675916e313f14f2e57 1 parent 42690b1
@maxtaco authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/tame.coffee
View
11 test/tame.coffee
@@ -1,4 +1,7 @@
+delay = (cb) ->
+ setTimeout cb, 10
+
atest "basic tame waiting", (cb) ->
i = 1
await setTimeout(defer(), 10)
@@ -29,4 +32,12 @@ atest "basic tame set structs", (cb) ->
field = "bar" # change the field to make sure that we captured "yo"
cb(obj.cat.yo == i, {})
+atest "continue / brek test" , (cb) ->
+ tot = 0
+ for i in [0..100]
+ await delay defer()
+ continue if i == 3
+ tot += i
+ break if i == 10
+ cb(tot == 52, {})
Please sign in to comment.
Something went wrong with that request. Please try again.