karma-summary-reporter
Advanced tools
Comparing version 3.0.0 to 3.1.0
14
index.js
var chalk_global = require('chalk'); | ||
var symbol = process.platform === 'win32' | ||
? {tick: '√', cross: '×'} | ||
: {tick: '✔', cross: '✖'}; | ||
var default_symbols = process.platform === 'win32' | ||
? {success: '√', failure: '×'} | ||
: {success: '✔', failure: '✖'}; | ||
@@ -30,2 +30,4 @@ function strmul(s, n) { | ||
var symbols = Object.assign({}, default_symbols, config.summaryReporter.symbols); | ||
var runStarted = false; | ||
@@ -90,8 +92,8 @@ var specorder, specresults; | ||
if (!result.partial) | ||
this.writeCommonMsg(chalk.green(' ' + symbol.tick + ' ')); | ||
this.writeCommonMsg(chalk.green(' ' + symbols.success + ' ')); | ||
else | ||
this.writeCommonMsg(chalk.yellow('(' + symbol.tick + ')')); | ||
this.writeCommonMsg(chalk.yellow('(' + symbols.success + ')')); | ||
} | ||
else { | ||
this.writeCommonMsg(chalk.red(' ' + symbol.cross + ' ')); | ||
this.writeCommonMsg(chalk.red(' ' + symbols.failure + ' ')); | ||
} | ||
@@ -98,0 +100,0 @@ }; |
{ | ||
"name": "karma-summary-reporter", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Displays a summary of tested browsers and failed testcases after a test run.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -62,3 +62,5 @@ # karma-summary-reporter | ||
// Show a list of test clients, 'always', 'never' or 'ifneeded' | ||
browserList: 'always' | ||
browserList: 'always', | ||
// Use custom symbols to indicate success and failure | ||
symbols: {success: 'o', failure: 'x'} | ||
} | ||
@@ -100,2 +102,19 @@ }); | ||
### symbols | ||
Customize the symbols used to show successful or failed tests. In some fonts the | ||
default symbols might not look optimal, so different ones can be configured. For | ||
example, to use pure ASCII symbols: | ||
symbols: { | ||
success: 'o', | ||
failure: 'x' | ||
} | ||
`symbols.success` is used for successful test cases, `symbols.failure` for | ||
failed test cases. | ||
It is expected that each of those symbols displays as a single character, | ||
otherwise the output might not line up correctly. | ||
## Test failure details | ||
@@ -102,0 +121,0 @@ |
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
17545
207
150