-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
234 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"validations": { | ||
"vulnerableDependencies": true, | ||
"uncommittedChanges": true, | ||
"untrackedFiles": true, | ||
"sensitiveData": true, | ||
"branch": "master", | ||
"gitTag": true | ||
}, | ||
"confirm": true, | ||
"publishTag": "latest", | ||
"prePublishScript": "npm test" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
var buildReporterPlugin = require('testcafe').embeddingUtils.buildReporterPlugin; | ||
var pluginFactory = require('../../lib'); | ||
var reporterTestCalls = require('./reporter-test-calls'); | ||
|
||
module.exports = function createReport (withColors) { | ||
var outStream = { | ||
data: '', | ||
|
||
write: function (text) { | ||
this.data += text; | ||
} | ||
}; | ||
|
||
var plugin = buildReporterPlugin(pluginFactory, outStream); | ||
|
||
plugin.chalk.enabled = !plugin.noColors && withColors; | ||
plugin.symbols = { ok: '✓', err: '✖' }; | ||
|
||
// NOTE: disable errors coloring if we don't have custom | ||
// error decorator. Default error colors may be prone to changing. | ||
if (plugin.chalk.enabled && !pluginFactory().createErrorDecorator) { | ||
var origFormatError = plugin.formatError; | ||
|
||
plugin.formatError = function () { | ||
plugin.chalk.enabled = false; | ||
|
||
var result = origFormatError.apply(plugin, arguments); | ||
|
||
plugin.chalk.enabled = true; | ||
|
||
return result; | ||
}; | ||
} | ||
|
||
reporterTestCalls.forEach(function (call) { | ||
plugin[call.method].apply(plugin, call.args); | ||
}); | ||
|
||
// NOTE: mock stack entries | ||
return outStream.data.replace(/\s*?\(.+?:\d+:\d+\)/g, ' (some-file:1:1)'); | ||
}; |
Oops, something went wrong.