Compare commits

..

2 Commits

Author SHA1 Message Date
slackersoft
2517ddfe17 bump verion to 2.1.2 2014-11-16 14:56:27 -08:00
slackersoft
23a492cb65 Suites still run their children even if none are executable
- Continue skipping beforeAll and afterAll

Fixes #707
2014-11-16 14:43:44 -08:00
8 changed files with 41 additions and 18 deletions

BIN
dist/jasmine-standalone-2.1.2.zip vendored Normal file

Binary file not shown.

View File

@@ -2044,13 +2044,12 @@ getJasmineRequireObj().Suite = function() {
var allFns = [];
for (var i = 0; i < this.children.length; i++) {
allFns.push(wrapChildAsAsync(this.children[i]));
}
if (this.isExecutable()) {
allFns = allFns.concat(this.beforeAllFns);
for (var i = 0; i < this.children.length; i++) {
allFns.push(wrapChildAsAsync(this.children[i]));
}
allFns = this.beforeAllFns.concat(allFns);
allFns = allFns.concat(this.afterAllFns);
}
@@ -2906,5 +2905,5 @@ getJasmineRequireObj().interface = function(jasmine, env) {
};
getJasmineRequireObj().version = function() {
return '2.1.1';
return '2.1.2';
};

View File

@@ -4,6 +4,6 @@
#
module Jasmine
module Core
VERSION = "2.1.1"
VERSION = "2.1.2"
end
end

View File

@@ -1,7 +1,7 @@
{
"name": "jasmine-core",
"license": "MIT",
"version": "2.1.1",
"version": "2.1.2",
"repository": {
"type": "git",
"url": "https://github.com/pivotal/jasmine.git"

14
release_notes/2.1.2.md Normal file
View File

@@ -0,0 +1,14 @@
# Jasmine Core 2.1.2 Release Notes
## Summary
This is a hotfix release of jasmine core to fix a breaking change with reporting when all of the specs in a suite are pending.
## Changes
- Suites still run their children even if none are executable
- Fixes [#707](http://github.com/pivotal/jasmine/issues/707)
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

View File

@@ -186,7 +186,7 @@ describe("Suite", function() {
expect(afterAllFn.fn).toHaveBeenCalled();
});
it("does not run beforeAll or afterAll if there are no child specs to run", function() {
it("does not run beforeAll or afterAll if there are no executable child specs", function() {
var env = new j$.Env(),
fakeQueueRunnerForParent = jasmine.createSpy('fake parent queue runner'),
fakeQueueRunnerForChild = jasmine.createSpy('fake child queue runner'),
@@ -209,7 +209,9 @@ describe("Suite", function() {
parentSuite.afterAll(afterAllFn);
parentSuite.execute();
expect(fakeQueueRunnerForParent).toHaveBeenCalledWith(jasmine.objectContaining({queueableFns: []}));
expect(fakeQueueRunnerForParent).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{ fn: jasmine.any(Function) }]
}));
});
it("calls a provided onStart callback when starting", function() {

View File

@@ -1101,8 +1101,10 @@ describe("Env integration", function() {
reporter.jasmineDone.and.callFake(function() {
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
totalSpecsDefined: 3
totalSpecsDefined: 5
});
expect(reporter.specDone.calls.count()).toBe(5);
var suiteResult = reporter.suiteStarted.calls.argsFor(1)[0];
expect(suiteResult.description).toEqual("A Suite");
@@ -1123,6 +1125,13 @@ describe("Env integration", function() {
env.expect(true).toBe(false);
});
});
env.describe('with only pending specs', function() {
env.it('is pending');
env.xit('is pending', function() {
env.expect(true).toBe(true);
});
});
});
env.execute();

View File

@@ -89,13 +89,12 @@ getJasmineRequireObj().Suite = function() {
var allFns = [];
for (var i = 0; i < this.children.length; i++) {
allFns.push(wrapChildAsAsync(this.children[i]));
}
if (this.isExecutable()) {
allFns = allFns.concat(this.beforeAllFns);
for (var i = 0; i < this.children.length; i++) {
allFns.push(wrapChildAsAsync(this.children[i]));
}
allFns = this.beforeAllFns.concat(allFns);
allFns = allFns.concat(this.afterAllFns);
}