Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/reporter

Package Overview
Dependencies
Maintainers
4
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/reporter - npm Package Compare versions

Comparing version 5.6.4 to 5.7.0

7

build/index.js

@@ -16,2 +16,4 @@ "use strict";

var _utils = require("./utils");
var _suite = _interopRequireDefault(require("./stats/suite"));

@@ -90,3 +92,3 @@

const hookStat = this.hooks[hook.uid];
hookStat.complete(hook.error);
hookStat.complete((0, _utils.getErrorsFromEvent)(hook));
this.counts.hooks++;

@@ -128,3 +130,3 @@ this.onHookEnd(hookStat);

testStat.fail(test.error);
testStat.fail((0, _utils.getErrorsFromEvent)(test));
this.counts.failures++;

@@ -180,2 +182,3 @@ this.counts.tests++;

this.runnerStat.failures = runner.failures;
this.runnerStat.retries = runner.retries;
this.runnerStat.complete();

@@ -182,0 +185,0 @@ this.onRunnerEnd(this.runnerStat);

@@ -21,5 +21,7 @@ "use strict";

complete(error) {
if (error) {
this.error = error;
complete(errors) {
this.errors = errors;
if (errors && errors.length) {
this.error = errors[0];
this.state = 'failed';

@@ -26,0 +28,0 @@ }

@@ -28,2 +28,3 @@ "use strict";

this.isMultiremote = runner.isMultiremote;
this.retry = runner.retry;
}

@@ -30,0 +31,0 @@

@@ -16,8 +16,8 @@ "use strict";

class SuiteStats extends _runnable.default {
constructor(runner) {
constructor(suite) {
super('suite');
this.uid = _runnable.default.getIdentifier(runner);
this.cid = runner.cid;
this.title = runner.title;
this.fullTitle = runner.fullTitle;
this.uid = _runnable.default.getIdentifier(suite);
this.cid = suite.cid;
this.title = suite.title;
this.fullTitle = suite.fullTitle;
this.tests = [];

@@ -24,0 +24,0 @@ this.hooks = [];

@@ -17,8 +17,8 @@ "use strict";

class TestStats extends _runnable.default {
constructor(runner) {
constructor(test) {
super('test');
this.uid = _runnable.default.getIdentifier(runner);
this.cid = runner.cid;
this.title = runner.title;
this.fullTitle = runner.fullTitle;
this.uid = _runnable.default.getIdentifier(test);
this.cid = test.cid;
this.title = test.title;
this.fullTitle = test.fullTitle;
this.output = [];

@@ -42,6 +42,10 @@ /**

fail(error) {
fail(errors) {
this.complete();
this.state = 'failed';
this.error = error;
this.errors = errors;
if (errors && errors.length) {
this.error = errors[0];
}
}

@@ -48,0 +52,0 @@

@@ -8,2 +8,3 @@ "use strict";

exports.sanitizeCaps = sanitizeCaps;
exports.getErrorsFromEvent = getErrorsFromEvent;

@@ -46,2 +47,17 @@ /**

return result.join('.');
}
/**
* Takes a event emitted by a framework and extracts
* an array of errors representing test or hook failures.
* This exists to maintain compatibility between frameworks
* with have a soft assertion model (Jasmine) and those that
* have a hard assertion model (Mocha)
* @param {*} e An event emitted by a framework adapter
*/
function getErrorsFromEvent(e) {
if (e.errors) return e.errors;
if (e.error) return [e.error];
return [];
}
{
"name": "@wdio/reporter",
"version": "5.6.4",
"version": "5.7.0",
"description": "A WebdriverIO utility to help reporting all events",

@@ -41,3 +41,3 @@ "author": "Christian Bromann <christian@saucelabs.com>",

},
"gitHead": "09f998f9e785873378b4436fd39c4dc37aa6e248"
"gitHead": "11da9ad430f42d8d03ace1d9f7b83ac29a8ce7f8"
}

@@ -316,3 +316,4 @@ WebdriverIO Reporter

config: [Object],
specs: [ '/path/to/project/test/my.test.js' ] }
specs: [ '/path/to/project/test/my.test.js' ] },
retry: 0
```

@@ -334,2 +335,3 @@

failures: 1,
retries: 1,
end: '2018-02-09T14:30:21.417Z' } }

@@ -336,0 +338,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc