Add test coverage for empty suite handling
This commit is contained in:
parent
96bcde80af
commit
9b9a4b6835
|
@ -965,6 +965,35 @@ describe("jasmine spec running", function () {
|
||||||
expect(nestedSpec.getFullName()).toEqual('Test Subject when under circumstance A and circumstance B behaves thusly.'); //, "Spec.fullName was incorrect: " + nestedSpec.getFullName());
|
expect(nestedSpec.getFullName()).toEqual('Test Subject when under circumstance A and circumstance B behaves thusly.'); //, "Spec.fullName was incorrect: " + nestedSpec.getFullName());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should skip empty suites", function () {
|
||||||
|
env.describe('NonEmptySuite1', function() {
|
||||||
|
env.it('should pass', function() {
|
||||||
|
this.expect(true).toEqual(true);
|
||||||
|
});
|
||||||
|
env.describe('NestedEmptySuite', function() {
|
||||||
|
});
|
||||||
|
env.it('should pass', function() {
|
||||||
|
this.expect(true).toEqual(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
env.describe('EmptySuite', function() {});
|
||||||
|
|
||||||
|
env.describe('NonEmptySuite2', function() {
|
||||||
|
env.it('should pass', function() {
|
||||||
|
this.expect(true).toEqual(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
env.execute();
|
||||||
|
fakeTimer.tick(0);
|
||||||
|
|
||||||
|
var runnerResults = env.currentRunner.getResults();
|
||||||
|
expect(runnerResults.totalCount).toEqual(3);
|
||||||
|
expect(runnerResults.passedCount).toEqual(3);
|
||||||
|
expect(runnerResults.failedCount).toEqual(0);
|
||||||
|
});
|
||||||
|
|
||||||
it("should bind 'this' to the running spec within the spec body", function() {
|
it("should bind 'this' to the running spec within the spec body", function() {
|
||||||
var spec;
|
var spec;
|
||||||
var suite = env.describe('one suite description', function () {
|
var suite = env.describe('one suite description', function () {
|
||||||
|
|
Loading…
Reference in New Issue