Not dying when there is a suite with no specs - this seems to happen in the bundled requirejs example.
This commit is contained in:
parent
0e5d54587d
commit
d6796a57a4
@ -90,12 +90,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
PhantomReporter.prototype.reportSuiteResults = function(suite) {
|
PhantomReporter.prototype.reportSuiteResults = function(suite) {
|
||||||
suite.timestamp = new Date();
|
if (suite.specs().length) {
|
||||||
suite.duration = suite.timestamp.getTime() - suite.specs()[0].startTime;
|
suite.timestamp = new Date();
|
||||||
phantom.sendMessage('jasmine.reportSuiteResults',{
|
suite.duration = suite.timestamp.getTime() - suite.specs()[0].startTime;
|
||||||
description : suite.description,
|
phantom.sendMessage('jasmine.reportSuiteResults',{
|
||||||
results : suite.results()
|
description : suite.description,
|
||||||
});
|
results : suite.results()
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function stringify(obj) {
|
function stringify(obj) {
|
||||||
|
Loading…
Reference in New Issue
Block a user