summaryrefslogtreecommitdiff
path: root/xstatic/pkg/jasmine/data/boot.js
diff options
context:
space:
mode:
Diffstat (limited to 'xstatic/pkg/jasmine/data/boot.js')
-rw-r--r--[-rwxr-xr-x]xstatic/pkg/jasmine/data/boot.js21
1 files changed, 15 insertions, 6 deletions
diff --git a/xstatic/pkg/jasmine/data/boot.js b/xstatic/pkg/jasmine/data/boot.js
index e8ddd55..a99774d 100755..100644
--- a/xstatic/pkg/jasmine/data/boot.js
+++ b/xstatic/pkg/jasmine/data/boot.js
@@ -35,13 +35,9 @@
var jasmineInterface = jasmineRequire.interface(jasmine, env);
/**
- * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
+ * Add all of the Jasmine global/public interface to the global scope, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
*/
- if (typeof window == "undefined" && typeof exports == "object") {
- extend(exports, jasmineInterface);
- } else {
- extend(window, jasmineInterface);
- }
+ extend(window, jasmineInterface);
/**
* ## Runner Parameters
@@ -56,6 +52,17 @@
var catchingExceptions = queryString.getParam("catch");
env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
+ var throwingExpectationFailures = queryString.getParam("throwFailures");
+ env.throwOnExpectationFailure(throwingExpectationFailures);
+
+ var random = queryString.getParam("random");
+ env.randomizeTests(random);
+
+ var seed = queryString.getParam("seed");
+ if (seed) {
+ env.seed(seed);
+ }
+
/**
* ## Reporters
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
@@ -63,6 +70,8 @@
var htmlReporter = new jasmine.HtmlReporter({
env: env,
onRaiseExceptionsClick: function() { queryString.navigateWithNewParam("catch", !env.catchingExceptions()); },
+ onThrowExpectationsClick: function() { queryString.navigateWithNewParam("throwFailures", !env.throwingExpectationFailures()); },
+ onRandomClick: function() { queryString.navigateWithNewParam("random", !env.randomTests()); },
addToExistingQueryString: function(key, value) { return queryString.fullStringWithNewParam(key, value); },
getContainer: function() { return document.body; },
createElement: function() { return document.createElement.apply(document, arguments); },