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.11.7 to 5.12.0

100

build/index.js

@@ -33,3 +33,3 @@ "use strict";

super();
this.options = options; // ensure the report directory exists
this.options = options;

@@ -62,5 +62,3 @@ if (this.options.outputDir) {

this.on('client:afterCommand', this.onAfterCommand.bind(this));
this.on('runner:start',
/* istanbul ignore next */
runner => {
this.on('runner:start', runner => {
rootSuite.cid = runner.cid;

@@ -70,5 +68,3 @@ this.runnerStat = new _runner.default(runner);

});
this.on('suite:start',
/* istanbul ignore next */
params => {
this.on('suite:start', params => {
const suite = new _suite.default(params);

@@ -81,5 +77,3 @@ const currentSuite = this.currentSuites[this.currentSuites.length - 1];

});
this.on('hook:start',
/* istanbul ignore next */
hook => {
this.on('hook:start', hook => {
const hookStat = new _hook.default(hook);

@@ -91,5 +85,3 @@ const currentSuite = this.currentSuites[this.currentSuites.length - 1];

});
this.on('hook:end',
/* istanbul ignore next */
hook => {
this.on('hook:end', hook => {
const hookStat = this.hooks[hook.uid];

@@ -100,5 +92,3 @@ hookStat.complete((0, _utils.getErrorsFromEvent)(hook));

});
this.on('test:start',
/* istanbul ignore next */
test => {
this.on('test:start', test => {
currentTest = new _test.default(test);

@@ -110,5 +100,3 @@ const currentSuite = this.currentSuites[this.currentSuites.length - 1];

});
this.on('test:pass',
/* istanbul ignore next */
test => {
this.on('test:pass', test => {
const testStat = this.tests[test.uid];

@@ -120,10 +108,4 @@ testStat.pass();

});
this.on('test:fail',
/* istanbul ignore next */
test => {
this.on('test:fail', test => {
const testStat = this.tests[test.uid];
/**
* replace "Ensure the done() callback is being called in this test." with more meaningful
* message (Mocha only)
*/

@@ -144,7 +126,2 @@ if (test.error && test.error.message && test.error.message.includes(_constants.MOCHA_TIMEOUT_MESSAGE)) {

currentTest = new _test.default(test);
/**
* In Mocha: tests that are skipped don't have a start event but a test end.
* In Jasmine: tests have a start event, therefor we need to replace the
* test instance with the pending test here
*/

@@ -169,11 +146,7 @@ if (test.uid in this.tests && this.tests[test.uid].state !== 'pending') {

});
this.on('test:end',
/* istanbul ignore next */
test => {
this.on('test:end', test => {
const testStat = this.tests[test.uid];
this.onTestEnd(testStat);
});
this.on('suite:end',
/* istanbul ignore next */
suite => {
this.on('suite:end', suite => {
const suiteStat = this.suites[suite.uid];

@@ -184,5 +157,3 @@ suiteStat.complete();

});
this.on('runner:end',
/* istanbul ignore next */
runner => {
this.on('runner:end', runner => {
rootSuite.complete();

@@ -194,9 +165,3 @@ this.runnerStat.failures = runner.failures;

});
/**
* browser client event handlers
*/
this.on('client:command',
/* istanbul ignore next */
payload => {
this.on('client:command', payload => {
if (!currentTest) {

@@ -210,5 +175,3 @@ return;

});
this.on('client:result',
/* istanbul ignore next */
payload => {
this.on('client:result', payload => {
if (!currentTest) {

@@ -223,74 +186,37 @@ return;

}
/**
* allows reporter to stale process shutdown process until required sync work
* is done (e.g. when having to send data to some server or any other async work)
*/
get isSynchronised() {
return true;
}
/**
* function to write to reporters output stream
*/
write(content) {
this.outputStream.write(content);
}
/* istanbul ignore next */
onRunnerStart() {}
/* istanbul ignore next */
onBeforeCommand() {}
/* istanbul ignore next */
onAfterCommand() {}
/* istanbul ignore next */
onScreenshot() {}
/* istanbul ignore next */
onSuiteStart() {}
/* istanbul ignore next */
onHookStart() {}
/* istanbul ignore next */
onHookEnd() {}
/* istanbul ignore next */
onTestStart() {}
/* istanbul ignore next */
onTestPass() {}
/* istanbul ignore next */
onTestFail() {}
/* istanbul ignore next */
onTestSkip() {}
/* istanbul ignore next */
onTestEnd() {}
/* istanbul ignore next */
onSuiteEnd() {}
/* istanbul ignore next */
onRunnerEnd() {}

@@ -297,0 +223,0 @@

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

/**
* Main class for a runnable class (e.g. test, suite or a hook)
* mainly used to capture its running duration
*/
class RunnableStats {

@@ -32,7 +28,3 @@ constructor(type) {

}
/**
* ToDo: we should always rely on uid
*/
static getIdentifier(runner) {

@@ -39,0 +31,0 @@ return runner.uid || runner.title;

@@ -14,6 +14,2 @@ "use strict";

/**
* Class to capture statistics about a test run. A test run is a single instance that
* runs one or more spec files
*/
class RunnerStats extends _runnable.default {

@@ -20,0 +16,0 @@ constructor(runner) {

@@ -12,5 +12,2 @@ "use strict";

/**
* Class describing statistics about a single suite.
*/
class SuiteStats extends _runnable.default {

@@ -17,0 +14,0 @@ constructor(suite) {

@@ -12,6 +12,2 @@ "use strict";

/**
* TestStats class
* captures data on a test.
*/
class TestStats extends _runnable.default {

@@ -26,7 +22,2 @@ constructor(test) {

this.argument = test.argument;
/**
* initial test state is pending
* the state can change to the following: passed, skipped, failed
*/
this.state = 'pending';

@@ -33,0 +24,0 @@ }

@@ -10,7 +10,2 @@ "use strict";

/**
* replaces whitespaces with underscore and removes dots
* @param {String} str variable to sanitize
* @return {String} sanitized variable
*/
function sanitizeString(str) {

@@ -23,8 +18,3 @@ if (!str) {

}
/**
* formats capability object into sanitized string for e.g.filenames
* @param {Object} caps Selenium capabilities
*/
function sanitizeCaps(caps) {

@@ -36,5 +26,2 @@ if (!caps) {

let result;
/**
* mobile caps
*/

@@ -50,12 +37,3 @@ if (caps.deviceName) {

}
/**
* 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) {

@@ -62,0 +40,0 @@ if (e.errors) return e.errors;

6

package.json
{
"name": "@wdio/reporter",
"version": "5.11.7",
"version": "5.12.0",
"description": "A WebdriverIO utility to help reporting all events",

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

"engines": {
"node": ">= 8.11.0"
"node": ">= 10.13.0"
},

@@ -42,3 +42,3 @@ "scripts": {

},
"gitHead": "945feb83efec8431cb448293bb2cc0f3b7fc1c16"
"gitHead": "187c8f044e252877533e53ee2b645f56416d5a41"
}
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