@@ -796,6 +796,32 @@ describe("Env integration", function() {
|
||||
|
||||
env.execute();
|
||||
});
|
||||
|
||||
it('should only run focused suites', function(){
|
||||
var env = new j$.Env(),
|
||||
calls = [];
|
||||
|
||||
var assertions = function() {
|
||||
expect(calls).toEqual(['focused']);
|
||||
done();
|
||||
};
|
||||
|
||||
env.addReporter({jasmineDone: assertions});
|
||||
|
||||
env.fdescribe('a focused suite', function() {
|
||||
env.it('is focused', function() {
|
||||
calls.push('focused');
|
||||
});
|
||||
});
|
||||
|
||||
env.describe('a regular suite', function() {
|
||||
env.it('is not focused', function() {
|
||||
calls.push('freakout');
|
||||
})
|
||||
});
|
||||
|
||||
env.execute();
|
||||
});
|
||||
});
|
||||
|
||||
it("should report as expected", function(done) {
|
||||
|
||||
@@ -293,6 +293,12 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
return suite;
|
||||
};
|
||||
|
||||
this.fdescribe = function(description, specDefinitions) {
|
||||
var suite = this.describe(description, specDefinitions);
|
||||
focusedRunnables.push(suite.id);
|
||||
return suite;
|
||||
};
|
||||
|
||||
var runnablesExplictlySet = false;
|
||||
|
||||
var runnablesExplictlySetGetter = function(){
|
||||
|
||||
Reference in New Issue
Block a user