mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
Fix browser testing (#5254)
* jasmine: specify 'after' only in Node The commands module is never executed in browsers and the 'after' constraint caused a regression where tests were never run in the browser. * jasmine: give the startup module a name like all others
This commit is contained in:
parent
f60d0ef109
commit
ae61b08ae5
@ -9,19 +9,20 @@ The main module of the Jasmine test plugin for TiddlyWiki5
|
|||||||
(function(){
|
(function(){
|
||||||
|
|
||||||
/*jslint node: true, browser: true */
|
/*jslint node: true, browser: true */
|
||||||
/*global $tw: false */
|
/*global $tw: true */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var TEST_TIDDLER_FILTER = "[type[application/javascript]tag[$:/tags/test-spec]]";
|
var TEST_TIDDLER_FILTER = "[type[application/javascript]tag[$:/tags/test-spec]]";
|
||||||
|
|
||||||
|
exports.name = "jasmine";
|
||||||
// Ensure this startup module is executed in the right order.
|
// Ensure this startup module is executed in the right order.
|
||||||
// Jasmine calls `process.exit()` with a non-zero exit code if there's
|
// In Node.js, Jasmine calls `process.exit()` with a non-zero exit code if there's
|
||||||
// any failed tests. Because of that, we want to make sure all critical
|
// any failed tests. Because of that, we want to make sure all critical
|
||||||
// startup modules are run before this one.
|
// startup modules are run before this one.
|
||||||
// * The "commands" module handles the --rendertiddler command-line flag,
|
// * The "commands" module handles the --rendertiddler command-line flag,
|
||||||
// which is typically given to export an HTML file that can be opened with
|
// which is typically given in order to export an HTML file that can be opened with
|
||||||
// a browser to run tests.
|
// a browser to run tests.
|
||||||
exports.after = ["commands"];
|
exports.after = $tw.node ? ["commands"] : [];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Startup function for running tests
|
Startup function for running tests
|
||||||
|
Loading…
Reference in New Issue
Block a user