kopia lustrzana https://github.com/c9/core
fix test runner
rodzic
b3c84e12a8
commit
700cf076d5
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue