From 60584d2aed2dccad26e9e50ce51c25e8dd51cc6b Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Tue, 8 Apr 2014 00:07:13 -0700 Subject: [PATCH] Add test for #103 --- test/tests.es6.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/tests.es6.js b/test/tests.es6.js index f487ca78357b..f34bd1bc5757 100644 --- a/test/tests.es6.js +++ b/test/tests.es6.js @@ -1636,3 +1636,15 @@ describe("labeled break and continue statements", function() { } }); }); + +describe("for loop with var decl and no update expression", function() { + // https://github.com/facebook/regenerator/issues/103 + function *range() { + for (var i = 0; false; ) { + } + } + + it("should compile and run", function() { + check(range(), []); + }); +});