You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've found a nice way to guarantee correct sort order even with shardTestFiles set to true. It was still a bit off with the one provided in the readme file.
What I do is patch jasmine2MetaDataBuilder and add instanceId to each spec which happens to be process.pid:
var org = { jasmine2MetaDataBuilder: htmlReporter.jasmine2MetaDataBuilder };
htmlReporter.jasmine2MetaDataBuilder = function () {
var metadata = org.jasmine2MetaDataBuilder.apply(this, arguments);
metadata.instanceId = process.pid;
return metadata;
};
Sort function:
module.exports = function sort(a, b) {
var valueA = a.instanceId * a.timestamp;
var valueB = b.instanceId * b.timestamp;
if (valueA < valueB) {
return -1;
}
return 1;
}
It would be nice if something like this could be incorporated.
The text was updated successfully, but these errors were encountered:
@FDIM I've found one issue (You were using sessionId name in one place and instanceId in other), fixed it, and updated base sort function to take into account instanceId.
First of all thanks for the reporter!
I think I've found a nice way to guarantee correct sort order even with
shardTestFiles
set to true. It was still a bit off with the one provided in the readme file.What I do is patch jasmine2MetaDataBuilder and add instanceId to each spec which happens to be process.pid:
Sort function:
It would be nice if something like this could be incorporated.
The text was updated successfully, but these errors were encountered: