jira-js-common
Version:
Common helper for writing report to ATM
18 lines (15 loc) • 397 B
JavaScript
function Suite(name, timestamp) {
this.name = name;
this.start = timestamp || Date.now();
this.testcases = [];
}
Suite.prototype.end = function(timestamp) {
this.stop = timestamp || Date.now();
};
Suite.prototype.hasTests = function() {
return this.testcases.length > 0;
};
Suite.prototype.addTest = function(test) {
this.testcases.push(test);
};
module.exports = Suite;