monocart-reporter 2.9.21 → 2.9.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,7 +127,7 @@ const generateData = async (results) => {
127
127
  const locale = options.locale;
128
128
 
129
129
  // add one last tick before end time
130
- const timestamp = Util.addTimezoneOffset(Date.now(), timezoneOffset);
130
+ const timestamp = Date.now();
131
131
  const tickInfo = await getTickInfo(timestamp);
132
132
  system.ticks.push(tickInfo);
133
133
 
@@ -205,12 +205,17 @@ const showTestResults = (reportData) => {
205
205
  // for shards
206
206
  const system = Array.isArray(reportData.system) ? reportData.system[0] : reportData.system;
207
207
 
208
+ // console.log(Util.dateFormat(reportData.date, reportData.locale));
209
+
210
+ const timezoneDate = Util.addTimezoneOffset(reportData.date, reportData.timezoneOffset);
211
+ // console.log(Util.dateFormat(timezoneDate, reportData.locale));
212
+
208
213
  rows = rows.concat([{
209
214
  name: 'Playwright',
210
215
  value: `v${system.playwright}`
211
216
  }, {
212
217
  name: 'Date',
213
- value: Util.dateFormat(reportData.date, reportData.locale)
218
+ value: Util.dateFormat(timezoneDate, reportData.locale)
214
219
  }, {
215
220
  name: 'Duration',
216
221
  value: Util.TF(reportData.duration)
package/lib/index.js CHANGED
@@ -52,7 +52,7 @@ class MonocartReporter {
52
52
  this.testMap = new Map();
53
53
 
54
54
  this.system = getSystemInfo();
55
- this.system.timestampStart = Util.addTimezoneOffset(timestampStart, this.options.timezoneOffset);
55
+ this.system.timestampStart = timestampStart;
56
56
  this.system.ticks = [];
57
57
 
58
58
  this.tickTime = this.options.tickTime || 1000;
@@ -144,7 +144,7 @@ class MonocartReporter {
144
144
 
145
145
  tickStart() {
146
146
  this.tick_time_id = setTimeout(async () => {
147
- const timestamp = Util.addTimezoneOffset(Date.now(), this.options.timezoneOffset);
147
+ const timestamp = Date.now();
148
148
  const tickInfo = await getTickInfo(timestamp);
149
149
  this.system.ticks.push(tickInfo);
150
150
  this.tickStart();
@@ -206,7 +206,7 @@ class MonocartReporter {
206
206
  if (!test.timestamps) {
207
207
  test.timestamps = [];
208
208
  }
209
- test.timestamps.push(Util.addTimezoneOffset(Date.now(), this.options.timezoneOffset));
209
+ test.timestamps.push(Date.now());
210
210
 
211
211
  // keep logs here with order
212
212
  // result stderr and stdout without order
@@ -250,7 +250,7 @@ class MonocartReporter {
250
250
  }
251
251
 
252
252
  // timestamps
253
- test.timestamps.push(Util.addTimezoneOffset(Date.now(), this.options.timezoneOffset));
253
+ test.timestamps.push(Date.now());
254
254
 
255
255
  }
256
256