diff --git a/js/common/modules/jsunity.js b/js/common/modules/jsunity.js index 0b7c936f8d..ead48f42a7 100644 --- a/js/common/modules/jsunity.js +++ b/js/common/modules/jsunity.js @@ -186,7 +186,7 @@ function RunTest (path, outputReply) { content = fs.read(path); - content = "(function(){require('jsunity').jsUnity.attachAssertions();" + content + "\n})"; + content = "(function(){require('jsunity').jsUnity.attachAssertions(); return (function() {" + content + "}());\n})"; f = internal.executeScript(content, undefined, path); if (f === undefined) {