Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2517ddfe17 | ||
|
|
23a492cb65 | ||
|
|
25c546a904 | ||
|
|
97ab0cb403 | ||
|
|
42b1bda919 |
BIN
dist/jasmine-standalone-2.1.1.zip
vendored
Normal file
BIN
dist/jasmine-standalone-2.1.1.zip
vendored
Normal file
Binary file not shown.
BIN
dist/jasmine-standalone-2.1.2.zip
vendored
Normal file
BIN
dist/jasmine-standalone-2.1.2.zip
vendored
Normal file
Binary file not shown.
@@ -574,6 +574,9 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
id: getNextSuiteId(),
|
id: getNextSuiteId(),
|
||||||
description: 'Jasmine__TopLevel__Suite',
|
description: 'Jasmine__TopLevel__Suite',
|
||||||
queueRunner: queueRunnerFactory,
|
queueRunner: queueRunnerFactory,
|
||||||
|
onStart: function(suite) {
|
||||||
|
reporter.suiteStarted(suite.result);
|
||||||
|
},
|
||||||
resultCallback: function(attrs) {
|
resultCallback: function(attrs) {
|
||||||
reporter.suiteDone(attrs);
|
reporter.suiteDone(attrs);
|
||||||
}
|
}
|
||||||
@@ -2041,13 +2044,12 @@ getJasmineRequireObj().Suite = function() {
|
|||||||
|
|
||||||
var allFns = [];
|
var allFns = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < this.children.length; i++) {
|
||||||
|
allFns.push(wrapChildAsAsync(this.children[i]));
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isExecutable()) {
|
if (this.isExecutable()) {
|
||||||
allFns = allFns.concat(this.beforeAllFns);
|
allFns = this.beforeAllFns.concat(allFns);
|
||||||
|
|
||||||
for (var i = 0; i < this.children.length; i++) {
|
|
||||||
allFns.push(wrapChildAsAsync(this.children[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
allFns = allFns.concat(this.afterAllFns);
|
allFns = allFns.concat(this.afterAllFns);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2903,5 +2905,5 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getJasmineRequireObj().version = function() {
|
getJasmineRequireObj().version = function() {
|
||||||
return '2.1.0';
|
return '2.1.2';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
#
|
#
|
||||||
module Jasmine
|
module Jasmine
|
||||||
module Core
|
module Core
|
||||||
VERSION = "2.1.0"
|
VERSION = "2.1.2"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "jasmine-core",
|
"name": "jasmine-core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "2.1.0",
|
"version": "2.1.2",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pivotal/jasmine.git"
|
"url": "https://github.com/pivotal/jasmine.git"
|
||||||
|
|||||||
14
release_notes/2.1.1.md
Normal file
14
release_notes/2.1.1.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Jasmine Core 2.1.1 Release Notes
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
This is a hotfix release of jasmine core to fix a breaking change with events emitted by the top-level suite
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
- Top-level suite triggers suiteStarted and suiteEnd to be consistent
|
||||||
|
- Fixes [#706](http://github.com/pivotal/jasmine/issues/706)
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
||||||
14
release_notes/2.1.2.md
Normal file
14
release_notes/2.1.2.md
Normal 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)_
|
||||||
@@ -186,7 +186,7 @@ describe("Suite", function() {
|
|||||||
expect(afterAllFn.fn).toHaveBeenCalled();
|
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(),
|
var env = new j$.Env(),
|
||||||
fakeQueueRunnerForParent = jasmine.createSpy('fake parent queue runner'),
|
fakeQueueRunnerForParent = jasmine.createSpy('fake parent queue runner'),
|
||||||
fakeQueueRunnerForChild = jasmine.createSpy('fake child queue runner'),
|
fakeQueueRunnerForChild = jasmine.createSpy('fake child queue runner'),
|
||||||
@@ -209,7 +209,9 @@ describe("Suite", function() {
|
|||||||
parentSuite.afterAll(afterAllFn);
|
parentSuite.afterAll(afterAllFn);
|
||||||
|
|
||||||
parentSuite.execute();
|
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() {
|
it("calls a provided onStart callback when starting", function() {
|
||||||
|
|||||||
@@ -100,6 +100,21 @@ describe("Env integration", function() {
|
|||||||
env.execute();
|
env.execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Tells the reporter when the top-level suite has started and finished', function(done) {
|
||||||
|
var env = new j$.Env(),
|
||||||
|
reporter = jasmine.createSpyObj('reporter', ['suiteStarted', 'suiteDone', 'jasmineDone']);
|
||||||
|
|
||||||
|
reporter.jasmineDone.and.callFake(function() {
|
||||||
|
expect(reporter.suiteStarted).toHaveBeenCalled();
|
||||||
|
expect(reporter.suiteDone).toHaveBeenCalled();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
env.addReporter(reporter);
|
||||||
|
|
||||||
|
env.execute();
|
||||||
|
});
|
||||||
|
|
||||||
it("Multiple top-level Suites execute as expected", function(done) {
|
it("Multiple top-level Suites execute as expected", function(done) {
|
||||||
var env = new j$.Env(),
|
var env = new j$.Env(),
|
||||||
calls = [];
|
calls = [];
|
||||||
@@ -1086,9 +1101,11 @@ describe("Env integration", function() {
|
|||||||
|
|
||||||
reporter.jasmineDone.and.callFake(function() {
|
reporter.jasmineDone.and.callFake(function() {
|
||||||
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
||||||
totalSpecsDefined: 3
|
totalSpecsDefined: 5
|
||||||
});
|
});
|
||||||
var suiteResult = reporter.suiteStarted.calls.first().args[0];
|
|
||||||
|
expect(reporter.specDone.calls.count()).toBe(5);
|
||||||
|
var suiteResult = reporter.suiteStarted.calls.argsFor(1)[0];
|
||||||
expect(suiteResult.description).toEqual("A Suite");
|
expect(suiteResult.description).toEqual("A Suite");
|
||||||
|
|
||||||
done();
|
done();
|
||||||
@@ -1108,6 +1125,13 @@ describe("Env integration", function() {
|
|||||||
env.expect(true).toBe(false);
|
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();
|
env.execute();
|
||||||
|
|||||||
@@ -180,6 +180,9 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
id: getNextSuiteId(),
|
id: getNextSuiteId(),
|
||||||
description: 'Jasmine__TopLevel__Suite',
|
description: 'Jasmine__TopLevel__Suite',
|
||||||
queueRunner: queueRunnerFactory,
|
queueRunner: queueRunnerFactory,
|
||||||
|
onStart: function(suite) {
|
||||||
|
reporter.suiteStarted(suite.result);
|
||||||
|
},
|
||||||
resultCallback: function(attrs) {
|
resultCallback: function(attrs) {
|
||||||
reporter.suiteDone(attrs);
|
reporter.suiteDone(attrs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,13 +89,12 @@ getJasmineRequireObj().Suite = function() {
|
|||||||
|
|
||||||
var allFns = [];
|
var allFns = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < this.children.length; i++) {
|
||||||
|
allFns.push(wrapChildAsAsync(this.children[i]));
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isExecutable()) {
|
if (this.isExecutable()) {
|
||||||
allFns = allFns.concat(this.beforeAllFns);
|
allFns = this.beforeAllFns.concat(allFns);
|
||||||
|
|
||||||
for (var i = 0; i < this.children.length; i++) {
|
|
||||||
allFns.push(wrapChildAsAsync(this.children[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
allFns = allFns.concat(this.afterAllFns);
|
allFns = allFns.concat(this.afterAllFns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user