@testomatio/reporter 1.6.1-beta-artifacts → 1.6.2

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.
@@ -66,7 +66,7 @@ function MochaReporter(runner, opts) {
66
66
  test_id: testId,
67
67
  suite_title: getSuiteTitle(test),
68
68
  title: getTestName(test),
69
- code: test.body.toString(),
69
+ code: process.env.TESTOMATIO_UPDATE_CODE ? test.body.toString() : '',
70
70
  file: getFile(test),
71
71
  time: test.duration,
72
72
  logs,
@@ -82,7 +82,7 @@ function MochaReporter(runner, opts) {
82
82
  client.addTestRun(STATUS.SKIPPED, {
83
83
  title: getTestName(test),
84
84
  suite_title: getSuiteTitle(test),
85
- code: test.body.toString(),
85
+ code: process.env.TESTOMATIO_UPDATE_CODE ? test.body.toString() : '',
86
86
  file: getFile(test),
87
87
  test_id: testId,
88
88
  time: test.duration,
@@ -102,7 +102,7 @@ function MochaReporter(runner, opts) {
102
102
  file: getFile(test),
103
103
  test_id: testId,
104
104
  title: getTestName(test),
105
- code: test.body.toString(),
105
+ code: process.env.TESTOMATIO_UPDATE_CODE ? test.body.toString() : '',
106
106
  time: test.duration,
107
107
  logs,
108
108
  });
@@ -70,10 +70,10 @@ class WebdriverReporter extends WDIOReporter {
70
70
  .map(el => Buffer.from(el.result.value, 'base64'));
71
71
 
72
72
  await this.client.addTestRun(state, {
73
- // manuallyAttachedArtifacts: test.artifacts,
73
+ manuallyAttachedArtifacts: test.artifacts,
74
74
  error,
75
75
  logs: test.logs,
76
- // meta: test.meta,
76
+ meta: test.meta,
77
77
  title,
78
78
  test_id: testId,
79
79
  time: duration,
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const program = require('commander');
2
+ const { program } = require('commander');
3
3
  const chalk = require('chalk');
4
4
  const glob = require('glob');
5
5
  const debug = require('debug')('@testomatio/reporter:xml-cli');
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const spawn = require('cross-spawn');
3
- const program = require('commander');
3
+ const { program } = require('commander');
4
4
  const chalk = require('chalk');
5
5
  const TestomatClient = require('../client');
6
6
  const { APP_PREFIX, STATUS } = require('../constants');
package/lib/pipe/debug.js CHANGED
@@ -8,7 +8,7 @@ const prettyMs = require('pretty-ms');
8
8
 
9
9
  class DebugPipe {
10
10
  constructor(params, store) {
11
- this.isEnabled = !!process.env.TESTOMATIO_DEBUG;
11
+ this.isEnabled = !!process.env.TESTOMATIO_DEBUG || !!process.env.DEBUG;
12
12
  if (this.isEnabled) {
13
13
  this.batch = {
14
14
  isEnabled: params.isBatchEnabled ?? !process.env.TESTOMATIO_DISABLE_BATCH_UPLOAD ?? true,
@@ -59,6 +59,7 @@ class DebugPipe {
59
59
  }
60
60
 
61
61
  async createRun(params = {}) {
62
+ if (!this.isEnabled) return;
62
63
  if (params.isBatchEnabled === true || params.isBatchEnabled === false) this.batch.isEnabled = params.isBatchEnabled;
63
64
 
64
65
  if (!this.isEnabled) return {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.6.1-beta-artifacts",
3
+ "version": "1.6.2",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",