Squashed commit of work to make Jasmine a collection of isolated modules. Note now that in our test suite, "jasmine" now always refers to the build jasmine loaded from jasmine.js and "j$" always refers to the code in the src directories.
Also, dev_boot.js is now a copy of boot.js and has additional changes to load jasmine the second time, into the j$ reference.
This commit is contained in:
30
src/core/requireCore.js
Normal file
30
src/core/requireCore.js
Normal file
@@ -0,0 +1,30 @@
|
||||
function getJasmineRequireObj() {
|
||||
if (typeof module !== "undefined" && module.exports) {
|
||||
return exports;
|
||||
} else {
|
||||
window.jasmineRequire = window.jasmineRequire || {};
|
||||
return window.jasmineRequire;
|
||||
}
|
||||
}
|
||||
|
||||
getJasmineRequireObj().core = function(jRequire) {
|
||||
j$ = {};
|
||||
|
||||
jRequire.base(j$);
|
||||
j$.util = jRequire.util();
|
||||
j$.Clock = jRequire.Clock();
|
||||
j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler();
|
||||
j$.Env = jRequire.Env(j$);
|
||||
j$.ExceptionFormatter = jRequire.ExceptionFormatter();
|
||||
j$.buildExpectationResult = jRequire.buildExpectationResult();
|
||||
j$.JsApiReporter = jRequire.JsApiReporter();
|
||||
j$.Matchers = jRequire.Matchers(j$);
|
||||
j$.StringPrettyPrinter = jRequire.StringPrettyPrinter(j$);
|
||||
j$.QueueRunner = jRequire.QueueRunner();
|
||||
j$.ReportDispatcher = jRequire.ReportDispatcher();
|
||||
j$.Spec = jRequire.Spec();
|
||||
j$.Suite = jRequire.Suite();
|
||||
j$.version = jRequire.version();
|
||||
|
||||
return j$;
|
||||
};
|
||||
Reference in New Issue
Block a user