Rewrite Spec & allow Jasmine to be namespaced
- THere seems to be a performance regression. Large test suites may throw - Regressions: Mock Clock won't install correctly, async specs are temporarily not supported. - Async spec runs/waits interface is gone. Blocks are gone. - Move most global usage into jasmine.Env constructor. - Remove optional 'Jasmine running' from HtmlReporter -- caused NS_FACTORY_ERROR in firefox when tested
This commit is contained in:
@@ -27,25 +27,19 @@
|
||||
},
|
||||
|
||||
expect: function(actual) {
|
||||
return env.currentSpec.expect(actual);
|
||||
return env.expect(actual);
|
||||
},
|
||||
|
||||
runs: function(func) {
|
||||
return env.currentSpec.runs(func);
|
||||
},
|
||||
|
||||
waits: function(timeout) {
|
||||
return env.currentSpec.waits(timeout);
|
||||
},
|
||||
|
||||
waitsFor: function(latchFunction, optional_timeoutMessage, optional_timeout) {
|
||||
return env.currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
|
||||
addMatchers: function(matchers) {
|
||||
return env.addMatchers(matchers);
|
||||
},
|
||||
|
||||
spyOn: function(obj, methodName) {
|
||||
return env.currentSpec.spyOn(obj, methodName);
|
||||
return env.spyOn(obj, methodName);
|
||||
},
|
||||
jsApiReporter: new jasmine.JsApiReporter()
|
||||
|
||||
|
||||
jsApiReporter: new jasmine.JsApiReporter(jasmine)
|
||||
};
|
||||
|
||||
if (typeof window == "undefined" && typeof exports == "object") {
|
||||
@@ -54,7 +48,7 @@
|
||||
jasmine.util.extend(window, jasmineInterface);
|
||||
}
|
||||
|
||||
var htmlReporter = new jasmine.HtmlReporter();
|
||||
var htmlReporter = new jasmine.HtmlReporter(null, jasmine);
|
||||
|
||||
env.addReporter(jasmineInterface.jsApiReporter);
|
||||
env.addReporter(htmlReporter);
|
||||
|
||||
Reference in New Issue
Block a user