@browsermation/test 0.0.63-beta.14 → 0.0.63-beta.16

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.
Files changed (2) hide show
  1. package/dist/reporter.js +12 -8
  2. package/package.json +1 -1
package/dist/reporter.js CHANGED
@@ -154,7 +154,7 @@ var BrowsermationReporter = class {
154
154
  async onBegin(_config, suite) {
155
155
  const data = {
156
156
  type: "begin",
157
- timestamp: Date.now(),
157
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
158
158
  git_branch: await this.getCurrentBranch(),
159
159
  git_repo: await this.getCurrentRepo(),
160
160
  git_commit_id: await this.getLatestCommitId(),
@@ -162,12 +162,15 @@ var BrowsermationReporter = class {
162
162
  git_remote_origin_url: await this.gitRemoteOriginUrl(),
163
163
  totalTests: suite.allTests().length,
164
164
  playwright_version: _config.version,
165
- node_version: process.version
165
+ node_version: process.version,
166
+ project_name: suite.project().name,
167
+ suite_title: suite.title,
168
+ suite_type: suite.type
166
169
  };
167
170
  this.log(`${JSON.stringify(data)}
168
171
  `);
169
172
  const response = await this.sendData(data);
170
- if (response && response.data.suite_run_id) {
173
+ if (response?.data?.suite_run_id) {
171
174
  this.suiteRunId = response.data.suite_run_id;
172
175
  this.log(`Received suite_run_id: ${this.suiteRunId}`);
173
176
  }
@@ -179,7 +182,7 @@ var BrowsermationReporter = class {
179
182
  start_time: result.startTime,
180
183
  duration_in_ms: result.duration,
181
184
  status: result.status,
182
- timestamp: Date.now()
185
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
183
186
  };
184
187
  this.log(`${JSON.stringify(data)}
185
188
  `);
@@ -192,7 +195,7 @@ var BrowsermationReporter = class {
192
195
  title: test.title,
193
196
  file: test.location.file,
194
197
  hostname: (0, import_node_os.hostname)(),
195
- timestamp: Date.now(),
198
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
196
199
  free_memory: (0, import_node_os.freemem)(),
197
200
  total_memory: (0, import_node_os.totalmem)(),
198
201
  cpus: (0, import_node_os.cpus)().length,
@@ -209,13 +212,14 @@ var BrowsermationReporter = class {
209
212
  id: test.id,
210
213
  suite_run_id: this.suiteRunId,
211
214
  type: "test-end",
215
+ project: test.parent.project.name,
212
216
  title: test.title,
213
217
  title_path: test.titlePath,
214
218
  result: result.status,
215
219
  status: result.status,
216
220
  duration_in_ms: result.duration,
217
221
  errors: stripAnsi(result.error?.message || ""),
218
- timestamp: Date.now(),
222
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
219
223
  free_memory: (0, import_node_os.freemem)(),
220
224
  total_memory: (0, import_node_os.totalmem)(),
221
225
  cpu_architecture: process.arch,
@@ -236,7 +240,7 @@ var BrowsermationReporter = class {
236
240
  suite_run_id: this.suiteRunId,
237
241
  message: error.message,
238
242
  stack: error.stack,
239
- timestamp: Date.now()
243
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
240
244
  };
241
245
  console.error(`${JSON.stringify(data)}
242
246
  `);
@@ -246,7 +250,7 @@ var BrowsermationReporter = class {
246
250
  const data = {
247
251
  type: "exit",
248
252
  suite_run_id: this.suiteRunId,
249
- timestamp: Date.now()
253
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
250
254
  };
251
255
  this.log(`${JSON.stringify(data)}
252
256
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsermation/test",
3
- "version": "0.0.63-beta.14",
3
+ "version": "0.0.63-beta.16",
4
4
  "description": "The testing platform for Playwright by Browsermation.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",