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) {
|
||||
suite.timestamp = new Date();
|
||||
suite.duration = suite.timestamp.getTime() - suite.specs()[0].startTime;
|
||||
phantom.sendMessage('jasmine.reportSuiteResults',{
|
||||
description : suite.description,
|
||||
results : suite.results()
|
||||
});
|
||||
if (suite.specs().length) {
|
||||
suite.timestamp = new Date();
|
||||
suite.duration = suite.timestamp.getTime() - suite.specs()[0].startTime;
|
||||
phantom.sendMessage('jasmine.reportSuiteResults',{
|
||||
description : suite.description,
|
||||
results : suite.results()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function stringify(obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user