Skip to content

Commit

Permalink
Added time field to test results.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocinbat committed Nov 6, 2017
1 parent 56a1d24 commit 06fe701
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mochalastic",
"version": "1.0.0",
"version": "1.1.0",
"engines": {
"node": ">=6.9.1"
},
Expand Down
2 changes: 2 additions & 0 deletions src/mochalastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = mochalastic;
function mochalastic(runner, options) {
mocha.reporters.Base.call(this, runner);
var reporterOptions = options.reporterOptions;
var currentDate = (new Date()).toISOString();

validate(reporterOptions, 'host');
validate(reporterOptions, 'port');
Expand Down Expand Up @@ -84,6 +85,7 @@ function mochalastic(runner, options) {
currentRetry: test.currentRetry(),
project: reporterOptions.project,
suite: reporterOptions.suite,
time: currentDate,
err: errorJSON(test.err || {})
};
}
Expand Down

0 comments on commit 06fe701

Please sign in to comment.