Deprecate suite/spec ordering hook .
- Remove parameter from env.execute() - Remove deprecated test - Set runnablesToRun to always start with the topSuite [#66789174]
This commit is contained in:
@@ -562,8 +562,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return topSuite;
|
return topSuite;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.execute = function(runnablesToRun) {
|
this.execute = function() {
|
||||||
runnablesToRun = runnablesToRun || [topSuite.id];
|
var runnablesToRun = [topSuite.id];
|
||||||
|
|
||||||
var allFns = [];
|
var allFns = [];
|
||||||
for(var i = 0; i < runnablesToRun.length; i++) {
|
for(var i = 0; i < runnablesToRun.length; i++) {
|
||||||
|
|||||||
@@ -378,44 +378,6 @@ describe("Env integration", function() {
|
|||||||
env.execute();
|
env.execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
it("Allows specifying which specs and suites to run", function(done) {
|
|
||||||
var env = new j$.Env(),
|
|
||||||
calls = [],
|
|
||||||
suiteCallback = jasmine.createSpy('suite callback'),
|
|
||||||
firstSpec,
|
|
||||||
secondSuite;
|
|
||||||
|
|
||||||
var assertions = function() {
|
|
||||||
expect(calls).toEqual([
|
|
||||||
'third spec',
|
|
||||||
'first spec'
|
|
||||||
]);
|
|
||||||
expect(suiteCallback).toHaveBeenCalled();
|
|
||||||
done();
|
|
||||||
};
|
|
||||||
|
|
||||||
env.addReporter({jasmineDone: assertions, suiteDone: suiteCallback});
|
|
||||||
|
|
||||||
env.describe("first suite", function() {
|
|
||||||
firstSpec = env.it("first spec", function() {
|
|
||||||
calls.push('first spec');
|
|
||||||
});
|
|
||||||
env.it("second spec", function() {
|
|
||||||
calls.push('second spec');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
secondSuite = env.describe("second suite", function() {
|
|
||||||
env.it("third spec", function() {
|
|
||||||
calls.push('third spec');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
env.execute([secondSuite.id, firstSpec.id]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Functions can be spied on and have their calls tracked", function (done) {
|
it("Functions can be spied on and have their calls tracked", function (done) {
|
||||||
var env = new j$.Env();
|
var env = new j$.Env();
|
||||||
|
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return topSuite;
|
return topSuite;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.execute = function(runnablesToRun) {
|
this.execute = function() {
|
||||||
runnablesToRun = runnablesToRun || [topSuite.id];
|
var runnablesToRun = [topSuite.id];
|
||||||
|
|
||||||
var allFns = [];
|
var allFns = [];
|
||||||
for(var i = 0; i < runnablesToRun.length; i++) {
|
for(var i = 0; i < runnablesToRun.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user