mirror of
https://github.com/leafo/moonscript.git
synced 2024-12-24 01:04:21 +00:00
continue spec
This commit is contained in:
parent
f04af88a8d
commit
bc2dee76b5
9
spec/loops_spec.moon
Normal file
9
spec/loops_spec.moon
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
describe "loops", ->
|
||||||
|
it "should continue", ->
|
||||||
|
input = {1,2,3,4,5,6}
|
||||||
|
output = for x in *input
|
||||||
|
continue if x % 2 == 1
|
||||||
|
x
|
||||||
|
|
||||||
|
assert.same output, { 2,4,6 }
|
Loading…
Reference in New Issue
Block a user