@wdio/reporter 8.0.0-alpha.331 → 8.0.0-alpha.411

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.
package/build/index.js CHANGED
@@ -13,25 +13,29 @@ const require = createRequire(import.meta.url);
13
13
  */
14
14
  const { createWriteStream, ensureDirSync } = require('fs-extra');
15
15
  export default class WDIOReporter extends EventEmitter {
16
+ options;
17
+ outputStream;
18
+ failures = 0;
19
+ suites = {};
20
+ hooks = {};
21
+ tests = {};
22
+ currentSuites = [];
23
+ counts = {
24
+ suites: 0,
25
+ tests: 0,
26
+ hooks: 0,
27
+ passes: 0,
28
+ skipping: 0,
29
+ failures: 0
30
+ };
31
+ retries = 0;
32
+ runnerStat;
33
+ isContentPresent = false;
34
+ specs = [];
35
+ currentSpec;
16
36
  constructor(options) {
17
37
  super();
18
38
  this.options = options;
19
- this.failures = 0;
20
- this.suites = {};
21
- this.hooks = {};
22
- this.tests = {};
23
- this.currentSuites = [];
24
- this.counts = {
25
- suites: 0,
26
- tests: 0,
27
- hooks: 0,
28
- passes: 0,
29
- skipping: 0,
30
- failures: 0
31
- };
32
- this.retries = 0;
33
- this.isContentPresent = false;
34
- this.specs = [];
35
39
  // ensure the report directory exists
36
40
  if (this.options.outputDir) {
37
41
  ensureDirSync(this.options.outputDir);
@@ -1,5 +1,13 @@
1
1
  import RunnableStats from './runnable.js';
2
2
  export default class HookStats extends RunnableStats {
3
+ uid;
4
+ cid;
5
+ title;
6
+ parent;
7
+ errors;
8
+ error;
9
+ state;
10
+ currentTest;
3
11
  constructor(runner) {
4
12
  super('hook');
5
13
  this.uid = RunnableStats.getIdentifier(runner);
@@ -3,10 +3,12 @@
3
3
  * mainly used to capture its running duration
4
4
  */
5
5
  export default class RunnableStats {
6
+ type;
7
+ start = new Date();
8
+ end;
9
+ _duration = 0;
6
10
  constructor(type) {
7
11
  this.type = type;
8
- this.start = new Date();
9
- this._duration = 0;
10
12
  }
11
13
  complete() {
12
14
  this.end = new Date();
@@ -5,6 +5,17 @@ import { sanitizeCaps } from '../utils.js';
5
5
  * runs one or more spec files
6
6
  */
7
7
  export default class RunnerStats extends RunnableStats {
8
+ cid;
9
+ capabilities;
10
+ sanitizedCapabilities;
11
+ config;
12
+ specs;
13
+ sessionId;
14
+ isMultiremote;
15
+ instanceOptions;
16
+ retry;
17
+ failures;
18
+ retries;
8
19
  constructor(runner) {
9
20
  super('runner');
10
21
  this.cid = runner.cid;
@@ -3,15 +3,24 @@ import RunnableStats from './runnable.js';
3
3
  * Class describing statistics about a single suite.
4
4
  */
5
5
  export default class SuiteStats extends RunnableStats {
6
+ uid;
7
+ cid;
8
+ file;
9
+ title;
10
+ fullTitle;
11
+ tags;
12
+ tests = [];
13
+ hooks = [];
14
+ suites = [];
15
+ parent;
16
+ /**
17
+ * an array of hooks and tests stored in order as they happen
18
+ */
19
+ hooksAndTests = [];
20
+ description;
21
+ rule;
6
22
  constructor(suite) {
7
23
  super(suite.type || 'suite');
8
- this.tests = [];
9
- this.hooks = [];
10
- this.suites = [];
11
- /**
12
- * an array of hooks and tests stored in order as they happen
13
- */
14
- this.hooksAndTests = [];
15
24
  this.uid = RunnableStats.getIdentifier(suite);
16
25
  this.cid = suite.cid;
17
26
  this.file = suite.file;
@@ -9,6 +9,23 @@ const maxStringLength = 2048;
9
9
  * captures data on a test.
10
10
  */
11
11
  export default class TestStats extends RunnableStats {
12
+ uid;
13
+ cid;
14
+ title;
15
+ currentTest;
16
+ fullTitle;
17
+ output;
18
+ argument;
19
+ retries;
20
+ parent;
21
+ /**
22
+ * initial test state is pending
23
+ * the state can change to the following: passed, skipped, failed
24
+ */
25
+ state;
26
+ pendingReason;
27
+ errors;
28
+ error;
12
29
  constructor(test) {
13
30
  super('test');
14
31
  this.uid = RunnableStats.getIdentifier(test);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/reporter",
3
- "version": "8.0.0-alpha.331+78ec9a352",
3
+ "version": "8.0.0-alpha.411+2d3189eaf",
4
4
  "description": "A WebdriverIO utility to help reporting all events",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-reporter",
@@ -33,16 +33,16 @@
33
33
  "@types/object-inspect": "^1.8.1",
34
34
  "@types/supports-color": "^8.1.1",
35
35
  "@types/tmp": "^0.2.3",
36
- "@wdio/types": "8.0.0-alpha.331+78ec9a352",
36
+ "@wdio/types": "8.0.0-alpha.411+2d3189eaf",
37
37
  "diff": "^5.0.0",
38
38
  "fs-extra": "^10.1.0",
39
39
  "object-inspect": "^1.12.0",
40
- "supports-color": "9.2.2"
40
+ "supports-color": "9.2.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/fs-extra": "^9.0.13",
44
44
  "@types/node": "^18.0.0",
45
45
  "tmp": "^0.2.1"
46
46
  },
47
- "gitHead": "78ec9a35262f7d5ff4001cf777553f0a3c173d6d"
47
+ "gitHead": "2d3189eaf8779f61699c1377f44f9841ed8a72c7"
48
48
  }