Socket
Socket
Sign inDemoInstall

testcafe-reporter-list

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testcafe-reporter-list - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

208

lib/index.js

@@ -1,114 +0,98 @@

'use strict';
"use strict";
Object.defineProperty(exports, '__esModule', {
value: true
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = function () {
return {
noColors: false,
startTime: null,
afterErrList: false,
currentFixtureName: null,
testCount: 0,
skipped: 0,
reportTaskStart: function reportTaskStart(startTime, userAgents, testCount) {
var _this = this;
this.startTime = startTime;
this.testCount = testCount;
this.setIndent(1).useWordWrap(true).write(this.chalk.bold('Running tests in:')).newline();
userAgents.forEach(function (ua) {
_this.write('- ' + _this.chalk.blue(ua)).newline();
});
this.newline();
},
reportFixtureStart: function reportFixtureStart(name) {
this.currentFixtureName = name;
},
_renderErrors: function _renderErrors(errs) {
var _this2 = this;
this.setIndent(3).newline();
errs.forEach(function (err, idx) {
var prefix = _this2.chalk.red(idx + 1 + ') ');
_this2.newline().write(_this2.formatError(err, prefix)).newline().newline();
});
},
reportTestDone: function reportTestDone(name, testRunInfo) {
var hasErr = !!testRunInfo.errs.length;
var symbol = null;
var nameStyle = null;
if (testRunInfo.skipped) {
this.skipped++;
symbol = this.chalk.cyan('-');
nameStyle = this.chalk.cyan;
} else if (hasErr) {
symbol = this.chalk.red.bold(this.symbols.err);
nameStyle = this.chalk.red.bold;
} else {
symbol = this.chalk.green(this.symbols.ok);
nameStyle = this.chalk.grey;
}
name = this.currentFixtureName + ' - ' + name;
var title = symbol + ' ' + nameStyle(name);
if (testRunInfo.unstable) title += this.chalk.yellow(' (unstable)');
if (testRunInfo.screenshotPath) title += ' (screenshots: ' + this.chalk.grey.underline(testRunInfo.screenshotPath) + ')';
this.setIndent(1).useWordWrap(true).write(title);
if (hasErr) this._renderErrors(testRunInfo.errs);
this.afterErrList = hasErr;
this.newline();
},
_renderWarnings: function _renderWarnings(warnings) {
var _this3 = this;
this.newline().setIndent(1).write(this.chalk.bold.yellow('Warnings (' + warnings.length + '):')).newline();
warnings.forEach(function (msg) {
_this3.setIndent(1).write(_this3.chalk.bold.yellow('--')).newline().setIndent(2).write(msg).newline();
});
},
reportTaskDone: function reportTaskDone(endTime, passed, warnings) {
var durationMs = endTime - this.startTime;
var durationStr = this.moment.duration(durationMs).format('h[h] mm[m] ss[s]');
var footer = passed === this.testCount ? this.chalk.bold.green(this.testCount + ' passed') : this.chalk.bold.red(this.testCount - passed + '/' + this.testCount + ' failed');
footer += this.chalk.gray(' (' + durationStr + ')');
this.setIndent(1).useWordWrap(true);
if (!this.afterErrList) this.newline();
this.newline().write(footer).newline();
if (this.skipped > 0) {
this.write(this.chalk.cyan(this.skipped + ' skipped')).newline();
}
if (warnings.length) this._renderWarnings(warnings);
}
};
};
module.exports = exports['default'];
exports["default"] = _default;
function _default() {
return {
noColors: false,
startTime: null,
afterErrList: false,
currentFixtureName: null,
testCount: 0,
skipped: 0,
reportTaskStart: function reportTaskStart(startTime, userAgents, testCount) {
var _this = this;
this.startTime = startTime;
this.testCount = testCount;
var writeData = {
startTime: startTime,
userAgents: userAgents,
testCount: testCount
};
this.setIndent(1).useWordWrap(true).write(this.chalk.bold('Running tests in:'), writeData).newline();
userAgents.forEach(function (ua) {
_this.write("- ".concat(_this.chalk.blue(ua)), writeData).newline();
});
this.newline();
},
reportFixtureStart: function reportFixtureStart(name) {
this.currentFixtureName = name;
},
_renderErrors: function _renderErrors(errs, writeData) {
var _this2 = this;
this.setIndent(3).newline();
errs.forEach(function (err, idx) {
var prefix = _this2.chalk.red("".concat(idx + 1, ") "));
_this2.newline().write(_this2.formatError(err, prefix), writeData).newline().newline();
});
},
reportTestDone: function reportTestDone(name, testRunInfo, meta) {
var hasErr = !!testRunInfo.errs.length;
var symbol = null;
var nameStyle = null;
if (testRunInfo.skipped) {
this.skipped++;
symbol = this.chalk.cyan('-');
nameStyle = this.chalk.cyan;
} else if (hasErr) {
symbol = this.chalk.red.bold(this.symbols.err);
nameStyle = this.chalk.red.bold;
} else {
symbol = this.chalk.green(this.symbols.ok);
nameStyle = this.chalk.grey;
}
name = "".concat(this.currentFixtureName, " - ").concat(name);
var title = "".concat(symbol, " ").concat(nameStyle(name));
if (testRunInfo.unstable) title += this.chalk.yellow(' (unstable)');
if (testRunInfo.screenshotPath) title += " (screenshots: ".concat(this.chalk.grey.underline(testRunInfo.screenshotPath), ")");
var writeData = {
name: name,
testRunInfo: testRunInfo,
meta: meta
};
this.setIndent(1).useWordWrap(true).write(title, writeData);
if (hasErr) this._renderErrors(testRunInfo.errs, writeData);
this.afterErrList = hasErr;
this.newline();
},
_renderWarnings: function _renderWarnings(warnings, writeData) {
var _this3 = this;
this.newline().setIndent(1).write(this.chalk.bold.yellow("Warnings (".concat(warnings.length, "):")), writeData).newline();
warnings.forEach(function (msg) {
_this3.setIndent(1).write(_this3.chalk.bold.yellow('--'), writeData).newline().setIndent(2).write(msg, writeData).newline();
});
},
reportTaskDone: function reportTaskDone(endTime, passed, warnings, result) {
var durationMs = endTime - this.startTime;
var durationStr = this.moment.duration(durationMs).format('h[h] mm[m] ss[s]');
var footer = passed === this.testCount ? this.chalk.bold.green("".concat(this.testCount, " passed")) : this.chalk.bold.red("".concat(this.testCount - passed, "/").concat(this.testCount, " failed"));
footer += this.chalk.gray(" (".concat(durationStr, ")"));
var writeData = {
endTime: endTime,
passed: passed,
warnings: warnings,
result: result
};
this.setIndent(1).useWordWrap(true);
if (!this.afterErrList) this.newline();
this.newline().write(footer, writeData).newline();
if (this.skipped > 0) {
this.write(this.chalk.cyan("".concat(this.skipped, " skipped")), writeData).newline();
}
if (warnings.length) this._renderWarnings(warnings, writeData);
}
};
}
module.exports = exports.default;
{
"name": "testcafe-reporter-list",
"version": "2.1.0",
"version": "2.2.0",
"description": "List TestCafe reporter plugin.",

@@ -16,2 +16,3 @@ "repository": "https://github.com/DevExpress/testcafe-reporter-list",

"test": "gulp test",
"build": "gulp build",
"publish-please": "publish-please",

@@ -28,15 +29,18 @@ "prepublish": "publish-please guard"

"devDependencies": {
"babel-eslint": "^4.0.10",
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@babel/eslint-parser": "^7.21.3",
"babel-plugin-add-module-exports": "^1.0.4",
"callsite-record": "^3.2.0",
"del": "^1.2.0",
"gulp": "^3.9.0",
"gulp-babel": "^5.2.1",
"gulp-eslint": "^1.1.1",
"gulp-mocha": "^2.2.0",
"normalize-newline": "^1.0.2",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-eslint": "^6.0.0",
"gulp-mocha": "^8.0.0",
"normalize-newline": "^3.0.0",
"os-family": "^1.0.0",
"publish-please": "^2.1.4",
"publish-please": "^5.5.2",
"read-file-relative": "^1.2.0",
"testcafe": "0.9.0"
"testcafe": "2.4.0"
}
}

@@ -12,2 +12,6 @@ # testcafe-reporter-list

This reporter is shipped with TestCafe by default. In most cases, you won't need to install it separately.
However, if you need to install this reporter, you can use the following command.
```

@@ -14,0 +18,0 @@ npm install testcafe-reporter-list

Sorry, the diff of this file is not supported yet

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