You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
3
+
4
+
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
5
+
6
+
The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.
* Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
22
+
*/
23
+
jasmineRequire.html(jasmine);
24
+
25
+
/**
26
+
* Create the Jasmine environment. This is used to run all specs in a project.
27
+
*/
28
+
varenv=jasmine.getEnv();
29
+
30
+
/**
31
+
* ## The Global Interface
32
+
*
33
+
* Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
* 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`.
* 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).
* Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.
91
+
*/
92
+
window.setTimeout=window.setTimeout;
93
+
window.setInterval=window.setInterval;
94
+
window.clearTimeout=window.clearTimeout;
95
+
window.clearInterval=window.clearInterval;
96
+
97
+
/**
98
+
* ## Execution
99
+
*
100
+
* Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
0 commit comments