UNPKG

jira-js-common

Version:

Common helper for writing report to ATM

23 lines (18 loc) 480 B
'use strict'; function Step(name, timestamp) { this.name = name; this.start = timestamp || Date.now(); this.steps = []; this.attachments = []; } Step.prototype.addStep = function (step) { this.steps.push(step); }; Step.prototype.addAttachment = function (attachment) { this.attachments.push(attachment); }; Step.prototype.end = function (status, timestamp) { this.status = status; this.stop = timestamp || Date.now(); }; module.exports = Step;