testcafe-reporter-minimal
Advanced tools
Comparing version 1.0.2 to 2.0.0
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
var NEW_LINE = '\n '; | ||
var NEW_LINE = '\n '; | ||
@@ -20,9 +20,9 @@ exports['default'] = function () { | ||
var uaList = userAgents.map(function (ua) { | ||
return _this.chalk.blue(ua); | ||
}).join(', '); | ||
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(); | ||
}); | ||
}, | ||
@@ -34,6 +34,6 @@ | ||
reportTestDone: function reportTestDone(name, errs) { | ||
reportTestDone: function reportTestDone(name, testRunInfo) { | ||
var _this2 = this; | ||
var hasErr = !!errs.length; | ||
var hasErr = !!testRunInfo.errs.length; | ||
var dot = hasErr ? this.chalk.red('.') : '.'; | ||
@@ -49,3 +49,3 @@ | ||
if (hasErr) { | ||
this.errDescriptors = this.errDescriptors.concat(errs.map(function (err) { | ||
this.errDescriptors = this.errDescriptors.concat(testRunInfo.errs.map(function (err) { | ||
return { | ||
@@ -60,18 +60,33 @@ err: err, | ||
reportTaskDone: function reportTaskDone(endTime, passed) { | ||
_renderErrors: function _renderErrors() { | ||
var _this3 = this; | ||
this.newline(); | ||
this.errDescriptors.forEach(function (errDescriptor) { | ||
var title = _this3.chalk.bold.red(_this3.symbols.err) + ' ' + errDescriptor.fixtureName + ' - ' + errDescriptor.testName; | ||
_this3.setIndent(1).useWordWrap(true).newline().write(title).newline().newline().setIndent(3).write(_this3.formatError(errDescriptor.err)).newline().newline(); | ||
}); | ||
}, | ||
_renderWarnings: function _renderWarnings(warnings) { | ||
var _this4 = this; | ||
this.newline().setIndent(1).write(this.chalk.bold.yellow('Warnings (' + warnings.length + '):')).newline(); | ||
warnings.forEach(function (msg) { | ||
_this4.setIndent(1).write(_this4.chalk.bold.yellow('--')).newline().setIndent(2).write(msg).newline(); | ||
}); | ||
}, | ||
reportTaskDone: function reportTaskDone(endTime, passed, warnings) { | ||
var allPassed = !this.errDescriptors.length; | ||
var footer = allPassed ? this.chalk.bold.green(this.testCount + ' passed') : this.chalk.bold.red(this.testCount - passed + '/' + this.testCount + ' failed'); | ||
this.setIndent(2).newline().newline().write(footer).newline(); | ||
if (!allPassed) this._renderErrors();else this.newline(); | ||
if (!allPassed) { | ||
this.errDescriptors.forEach(function (errDescriptor, idx) { | ||
var prefix = idx + 1 + ') '; | ||
var title = _this3.chalk.bold.red('' + prefix + errDescriptor.fixtureName + ' - ' + errDescriptor.testName); | ||
this.setIndent(1).newline().write(footer).newline(); | ||
_this3.setIndent(2).useWordWrap(true).newline().write(title).newline().setIndent(2 + prefix.length).write(_this3.formatError(errDescriptor.err)).newline().newline(); | ||
}); | ||
} | ||
if (warnings.length) this._renderWarnings(warnings); | ||
} | ||
@@ -78,0 +93,0 @@ }; |
{ | ||
"name": "testcafe-reporter-minimal", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "Minimal TestCafe reporter plugin.", | ||
@@ -38,4 +38,4 @@ "repository": "https://github.com/DevExpress/testcafe-reporter-minimal", | ||
"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
6116
66