testcafe-reporter-list
Advanced tools
Comparing version 1.0.2 to 2.0.0
@@ -18,10 +18,12 @@ 'use strict'; | ||
var uaList = userAgents.map(function (ua) { | ||
return _this.chalk.blue(ua); | ||
}).join(', '); | ||
this.startTime = startTime; | ||
this.testCount = testCount; | ||
this.setIndent(0).useWordWrap(true).write(this.chalk.bold('Running tests in: ' + uaList)).newline().newline(); | ||
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(); | ||
}, | ||
@@ -33,6 +35,16 @@ | ||
reportTestDone: function reportTestDone(name, errs, durationMs, unstable, screenshotPath) { | ||
_renderErrors: function _renderErrors(errs) { | ||
var _this2 = this; | ||
var hasErr = !!errs.length; | ||
this.setIndent(2).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 nameStyle = hasErr ? this.chalk.red.bold : this.chalk.gray; | ||
@@ -45,18 +57,10 @@ var symbol = hasErr ? this.chalk.red.bold(this.symbols.err) : this.chalk.green(this.symbols.ok); | ||
if (unstable) title += this.chalk.yellow(' (unstable)'); | ||
if (testRunInfo.unstable) title += this.chalk.yellow(' (unstable)'); | ||
if (screenshotPath) title += ' (screenshots: ' + this.chalk.underline(screenshotPath) + ')'; | ||
if (testRunInfo.screenshotPath) title += ' (screenshots: ' + this.chalk.grey.underline(testRunInfo.screenshotPath) + ')'; | ||
this.setIndent(1).useWordWrap(true).write(title); | ||
if (hasErr) { | ||
this.setIndent(3).newline(); | ||
if (hasErr) this._renderErrors(testRunInfo.errs); | ||
errs.forEach(function (err, idx) { | ||
var prefix = _this2.chalk.red(idx + 1 + ') '); | ||
_this2.newline().write(_this2.formatError(err, prefix)).newline().newline(); | ||
}); | ||
} | ||
this.afterErrList = hasErr; | ||
@@ -67,3 +71,13 @@ | ||
reportTaskDone: function reportTaskDone(endTime, passed) { | ||
_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; | ||
@@ -80,2 +94,4 @@ var durationStr = this.moment.duration(durationMs).format('h[h] mm[m] ss[s]'); | ||
this.newline().write(footer).newline(); | ||
if (warnings.length) this._renderWarnings(warnings); | ||
} | ||
@@ -82,0 +98,0 @@ }; |
{ | ||
"name": "testcafe-reporter-list", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "List TestCafe reporter plugin.", | ||
@@ -38,4 +38,4 @@ "repository": "https://github.com/DevExpress/testcafe-reporter-list", | ||
"read-file-relative": "^1.2.0", | ||
"testcafe": "0.0.21" | ||
"testcafe": "0.2.0-alpha" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6208
64