Introduce a configuration object to Env deprecating old single use functions
[finishes #159158038]
This commit is contained in:
@@ -518,7 +518,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.stopOnSpecFailure(true);
|
||||
env.configure({failFast: true});
|
||||
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
@@ -574,7 +574,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.stopOnSpecFailure(true);
|
||||
env.configure({failFast: true});
|
||||
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
@@ -628,7 +628,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.throwOnExpectationFailure(true);
|
||||
env.configure({oneFailurePerSpec: true});
|
||||
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
@@ -684,7 +684,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.throwOnExpectationFailure(true);
|
||||
env.configure({oneFailurePerSpec: true});
|
||||
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
@@ -713,7 +713,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.hideDisabled(false);
|
||||
env.configure({hideDisabled: false});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
@@ -738,7 +738,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.hideDisabled(true);
|
||||
env.configure({hideDisabled: true});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
@@ -748,27 +748,24 @@ describe("HtmlReporter", function() {
|
||||
|
||||
it("should not display specs that have been disabled", function() {
|
||||
var env = new jasmineUnderTest.Env(),
|
||||
container = document.createElement('div'),
|
||||
|
||||
getContainer = function() {return container;},
|
||||
|
||||
reporter = new jasmineUnderTest.HtmlReporter({
|
||||
env: env,
|
||||
getContainer: getContainer,
|
||||
createElement: function() { return document.createElement.apply(document, arguments); },
|
||||
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
||||
});
|
||||
env.hideDisabled(true);
|
||||
reporter.initialize();
|
||||
reporter.specDone({
|
||||
id: 789,
|
||||
status: "excluded",
|
||||
fullName: "symbols should have titles",
|
||||
passedExpectations: [],
|
||||
failedExpectations: []
|
||||
container = document.createElement('div'),
|
||||
getContainer = function() {return container;},
|
||||
reporter = new jasmineUnderTest.HtmlReporter({
|
||||
env: env,
|
||||
getContainer: getContainer,
|
||||
createElement: function() { return document.createElement.apply(document, arguments); },
|
||||
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
||||
});
|
||||
|
||||
|
||||
env.configure({hideDisabled: true});
|
||||
reporter.initialize();
|
||||
reporter.specDone({
|
||||
id: 789,
|
||||
status: "excluded",
|
||||
fullName: "symbols should have titles",
|
||||
passedExpectations: [],
|
||||
failedExpectations: []
|
||||
});
|
||||
|
||||
var specEl = container.querySelector('.jasmine-symbol-summary li');
|
||||
expect(specEl.getAttribute("class")).toEqual("jasmine-excluded-no-display");
|
||||
@@ -792,7 +789,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.randomizeTests(false);
|
||||
env.configure({random: false});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
@@ -817,7 +814,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.randomizeTests(true);
|
||||
env.configure({random: true});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
@@ -844,7 +841,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.randomizeTests(false);
|
||||
env.configure({random: false});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
@@ -873,7 +870,7 @@ describe("HtmlReporter", function() {
|
||||
}
|
||||
});
|
||||
|
||||
env.randomizeTests(true);
|
||||
env.configure({random: true});
|
||||
reporter.initialize();
|
||||
reporter.jasmineDone({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user