diff --git a/node_modules/architect-build/build_support/mini_require.js b/node_modules/architect-build/build_support/mini_require.js index 45407316..2eadd52a 100644 --- a/node_modules/architect-build/build_support/mini_require.js +++ b/node_modules/architect-build/build_support/mini_require.js @@ -254,8 +254,8 @@ var normalizeNames = function(parentId, moduleNames) { }); }; -var require = function(module, callback) { - return _require("", module, callback); +var require = function(module, callback, errback) { + return _require("", module, callback, errback); }; var config = require.config = function(cfg) { diff --git a/package.json b/package.json index 06409de2..bc2fd413 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "c9.ide.format": "#5ec97fb083", "c9.ide.help.support": "#e95f98f87c", "c9.ide.imgeditor": "#03a313cbab", - "c9.ide.immediate": "#29fd6d3f51", + "c9.ide.immediate": "#183b4adaf4", "c9.ide.installer": "#0fde9f0067", "c9.ide.mount": "#3e017a3324", "c9.ide.navigate": "#c191d9b92f", diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index 422fbb8a..3870a37a 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -293,19 +293,30 @@ c9Test.last = test; mocha.suite.suites.length = 0; - var app = window.app; - if (app && app.services && app.services.ext) - app.services.ext.unloadAllPlugins(); + function unloadApp() { + var app = window.app; + window.app = null; + try { + if (app && app.services && app.services.ext) + app.services.ext.unloadAllPlugins(); + } catch(e) { + callback && callback(e, getReport()); + return e; + } + } + + if (unloadApp()) return; setupDom(test); cleanupRequireModules(); lastDone = function(err, res) { lastDone = null; + if (!onload.remain && unloadApp()) return; callback && callback(err, res || getReport()); }; safeDisconnect(function() { - app = null; + window.app = null; if (typeof test == "function") { test(); if (!running) onload(); diff --git a/plugins/c9.vfs.standalone/www/test.js b/plugins/c9.vfs.standalone/www/test.js index 425e995e..feb439d0 100644 --- a/plugins/c9.vfs.standalone/www/test.js +++ b/plugins/c9.vfs.standalone/www/test.js @@ -8,6 +8,7 @@ require([ "lib/architect/architect" ], function (chai, skin, events, theme, architect) { "use strict"; + chai.Assertion.includeStack = true; // enable stack trace in errors var expect = chai.expect; var EventEmitter = events.EventEmitter;