Skip to content
Browse files

add regression tests for the new awesomeness.

  • Loading branch information...
1 parent 7c5b57b commit 6a21aaab8aa8dc6c3d5457b4eac47ad0b02d662c maxtaco committed with
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/tame.coffee
View
17 test/tame.coffee
@@ -42,3 +42,20 @@ atest "continue / brek test" , (cb) ->
break if i == 10
cb(tot == 52, {})
+atest "for k,v of obj testing", (cb) ->
+ obj = { the : "quick", brown : "fox", jumped : "over" };
+ s = ""
+ for k,v of obj
+ await delay defer()
+ s += k + " " + v + " "
+ cb( s == "the quick brown fox jumped over ", {} )
+
+atest "for k,v in arr testing", (cb) ->
+ obj = [ "the", "quick", "brown" ]
+ s = ""
+ for v,i in obj
+ await delay defer()
+ s += v + " " + i + " "
+ cb( s == "the 0 quick 1 brown 2 ", {} )
+
+

0 comments on commit 6a21aaa

Please sign in to comment.
Something went wrong with that request. Please try again.