mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-30 07:50:47 +00:00
Merge branch 'master' into demo-alternate-store
This commit is contained in:
commit
f3bc32a2e9
@ -750,7 +750,9 @@ Widget.prototype.removeLocalDomNodes = function() {
|
|||||||
// If this widget has directly created DOM nodes, delete them and exit.
|
// If this widget has directly created DOM nodes, delete them and exit.
|
||||||
if(this.domNodes.length > 0) {
|
if(this.domNodes.length > 0) {
|
||||||
$tw.utils.each(this.domNodes,function(domNode) {
|
$tw.utils.each(this.domNodes,function(domNode) {
|
||||||
domNode.parentNode.removeChild(domNode);
|
if(domNode.parentNode) {
|
||||||
|
domNode.parentNode.removeChild(domNode);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.domNodes = [];
|
this.domNodes = [];
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,11 @@ exports.runTests = function(callback,specFilter) {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
window.jasmineRequire = jasmineCore;
|
window.jasmineRequire = jasmineCore;
|
||||||
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js");
|
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js");
|
||||||
|
var previousOnloadHandler = window.onload;
|
||||||
|
window.onload = function() {};
|
||||||
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js");
|
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js");
|
||||||
|
var jasmineOnloadHandler = window.onload;
|
||||||
|
window.onload = function() {};
|
||||||
jasmine = window.jasmine;
|
jasmine = window.jasmine;
|
||||||
} else {
|
} else {
|
||||||
// Add missing properties to `jasmineCore` in order to call the Jasmine
|
// Add missing properties to `jasmineCore` in order to call the Jasmine
|
||||||
@ -144,9 +148,11 @@ exports.runTests = function(callback,specFilter) {
|
|||||||
// Iterate through all the test modules
|
// Iterate through all the test modules
|
||||||
var tests = $tw.wiki.filterTiddlers(TEST_TIDDLER_FILTER);
|
var tests = $tw.wiki.filterTiddlers(TEST_TIDDLER_FILTER);
|
||||||
$tw.utils.each(tests,evalInContext);
|
$tw.utils.each(tests,evalInContext);
|
||||||
// In a browser environment, jasmine-core/boot.js calls `execute()` for us.
|
// In a browser environment, we use jasmine-core/boot.js to call `execute()` for us.
|
||||||
// In Node.js, we call it manually.
|
// In Node.js, we call it manually.
|
||||||
if(!$tw.browser) {
|
if($tw.browser) {
|
||||||
|
jasmineOnloadHandler();
|
||||||
|
} else {
|
||||||
nodeJasmineWrapper.execute(null,specFilter);
|
nodeJasmineWrapper.execute(null,specFilter);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -17,8 +17,9 @@ var jasmine = require("./jasmine-plugin.js");
|
|||||||
exports.name = "jasmine";
|
exports.name = "jasmine";
|
||||||
|
|
||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
// Jasmine is run automatically on the browser, so always add it here.
|
|
||||||
exports.startup = jasmine.runTests;
|
exports.startup = jasmine.runTests;
|
||||||
|
exports.before = ["render"];
|
||||||
|
exports.after = ["story"];
|
||||||
} else {
|
} else {
|
||||||
// However, if we're on node.js, the tests are explciitly run with the
|
// However, if we're on node.js, the tests are explciitly run with the
|
||||||
// --test command. This didn't used to be the case, so if they're
|
// --test command. This didn't used to be the case, so if they're
|
||||||
|
Loading…
Reference in New Issue
Block a user