Introduce a configuration object to Env deprecating old single use functions
[finishes #159158038]
This commit is contained in:
+18
-2
@@ -27,7 +27,7 @@ describe("Env", function() {
|
||||
});
|
||||
|
||||
it('can configure specs to throw errors on expectation failures', function() {
|
||||
env.throwOnExpectationFailure(true);
|
||||
env.configure({oneFailurePerSpec: true});
|
||||
|
||||
spyOn(jasmineUnderTest, 'Spec');
|
||||
env.it('foo', function() {});
|
||||
@@ -37,7 +37,7 @@ describe("Env", function() {
|
||||
});
|
||||
|
||||
it('can configure suites to throw errors on expectation failures', function() {
|
||||
env.throwOnExpectationFailure(true);
|
||||
env.configure({oneFailurePerSpec: true});
|
||||
|
||||
spyOn(jasmineUnderTest, 'Suite');
|
||||
env.describe('foo', function() {});
|
||||
@@ -46,6 +46,22 @@ describe("Env", function() {
|
||||
}));
|
||||
});
|
||||
|
||||
it('defaults to multiple failures for specs', function() {
|
||||
spyOn(jasmineUnderTest, 'Spec');
|
||||
env.it('bar', function() {});
|
||||
expect(jasmineUnderTest.Spec).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||
throwOnExpectationFailure: false
|
||||
}));
|
||||
});
|
||||
|
||||
it('defaults to multiple failures for suites', function() {
|
||||
spyOn(jasmineUnderTest, 'Suite');
|
||||
env.describe('foo', function() {});
|
||||
expect(jasmineUnderTest.Suite).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||
throwOnExpectationFailure: false
|
||||
}));
|
||||
});
|
||||
|
||||
describe('#describe', function () {
|
||||
it("throws an error when given arguments", function() {
|
||||
expect(function() {
|
||||
|
||||
Reference in New Issue
Block a user