Skip to content

Commit a1ffb0b

Browse files
author
Oleksandr_Halichenko
committed
added legacyTimeFormat flag to support old versions of report portal
1 parent 9b72eba commit a1ffb0b

File tree

5 files changed

+1605
-771
lines changed

5 files changed

+1605
-771
lines changed

CHANGELOG.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.0.0
2+
- added `legacyTimeFormat` flag to support old versions of report portal
3+
14
## 0.15.0
25
- added request/response renderer of internal mime type _text/x.response.json_
36

README.MD

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ module.exports = {
2727
retry: 1, // number of retries to send result to report portal (default - 1)
2828
ignoreErrors: false, // ignore RP errors (default: false)
2929
showLaunchURL: true, // log report portal launch link,
30-
tagsAsAttributes: true // (default: false → tags go to description)
30+
tagsAsAttributes: true, // (default: false - tags go to description)
31+
legacyTimeFormat: true // (default: false - use legacy miliseconds precision instead of mictoseconds)
3132
},
3233
}
3334
}

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class RPFormatter extends Formatter {
1717
this.rpClient = new RPClient(this.rpConfig);
1818
this.promiseQ = [];
1919
this.stepDefinitions = {};
20+
if (this.rpConfig.legacyTimeFormat) {
21+
this.rpClient.helpers.now = () => { return Date.now() };
22+
}
2023
}
2124

2225
async processEnvelope(envelope) {

0 commit comments

Comments
 (0)