diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index d5f4f8d2..62c50503 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1734,12 +1734,6 @@ jasmine.Suite.prototype.execute = function(onComplete) { for (var i = 0; i < children.length; i++) { allFns.push(wrapChild(children[i])); - - function wrapChild(child) { - return function(done) { - child.execute(done); - } - } } this.onStart(this); @@ -1756,6 +1750,12 @@ jasmine.Suite.prototype.execute = function(onComplete) { onComplete(); } } + + function wrapChild(child) { + return function (done) { + child.execute(done); + } + } }; jasmine.Clock = function(global, delayedFunctionScheduler) { var self = this, diff --git a/src/core/Suite.js b/src/core/Suite.js index 5fbdaabf..acb12e14 100644 --- a/src/core/Suite.js +++ b/src/core/Suite.js @@ -74,12 +74,6 @@ jasmine.Suite.prototype.execute = function(onComplete) { for (var i = 0; i < children.length; i++) { allFns.push(wrapChild(children[i])); - - function wrapChild(child) { - return function(done) { - child.execute(done); - } - } } this.onStart(this); @@ -96,4 +90,10 @@ jasmine.Suite.prototype.execute = function(onComplete) { onComplete(); } } + + function wrapChild(child) { + return function (done) { + child.execute(done); + } + } };