Expose Jasmine's topSuite [finishes #59774024]
This commit is contained in:
@@ -92,6 +92,12 @@ describe("Env", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("#topSuite", function() {
|
||||||
|
it("returns the Jasmine top suite for users to traverse the spec tree", function() {
|
||||||
|
var suite = env.topSuite();
|
||||||
|
expect(suite.description).toEqual('Jasmine__TopLevel__Suite');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: move these into a separate file
|
// TODO: move these into a separate file
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
runnableLookupTable[topSuite.id] = topSuite;
|
runnableLookupTable[topSuite.id] = topSuite;
|
||||||
currentSuite = topSuite;
|
currentSuite = topSuite;
|
||||||
|
|
||||||
|
this.topSuite = function() {
|
||||||
|
return topSuite;
|
||||||
|
};
|
||||||
|
|
||||||
this.execute = function(runnablesToRun) {
|
this.execute = function(runnablesToRun) {
|
||||||
runnablesToRun = runnablesToRun || [topSuite.id];
|
runnablesToRun = runnablesToRun || [topSuite.id];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user