mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-25 00:19:22 -06:00
fix for enabling turning off stripping ansi for that 1 special reporter test
This commit is contained in:
@@ -142,6 +142,10 @@ type ExecOptions = {
|
||||
* If set, automatically snapshot the test's stdout.
|
||||
*/
|
||||
snapshot?: boolean
|
||||
/**
|
||||
* By default strip ansi codes from stdout. Pass false to turn off.
|
||||
*/
|
||||
stripAnsi?: boolean
|
||||
/**
|
||||
* Pass a function to assert on and/or modify the stdout before snapshotting.
|
||||
*/
|
||||
@@ -636,6 +640,7 @@ const systemTests = {
|
||||
timeout: 120000,
|
||||
originalTitle: null,
|
||||
expectedExitCode: 0,
|
||||
stripAnsi: true,
|
||||
sanitizeScreenshotDimensions: false,
|
||||
normalizeStdoutAvailableBrowsers: true,
|
||||
noExit: process.env.NO_EXIT,
|
||||
@@ -852,9 +857,11 @@ const systemTests = {
|
||||
}
|
||||
})
|
||||
|
||||
// always strip ansi from stdout before yielding
|
||||
// it to any callback functions
|
||||
stdout = stripAnsi(stdout)
|
||||
if (options.stripAnsi) {
|
||||
// always strip ansi from stdout before yielding
|
||||
// it to any callback functions
|
||||
stdout = stripAnsi(stdout)
|
||||
}
|
||||
|
||||
// snapshot the stdout!
|
||||
if (options.snapshot) {
|
||||
|
||||
@@ -187,6 +187,7 @@ describe('e2e reporters', () => {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'slowTestThreshold.cy.js',
|
||||
snapshot: false,
|
||||
stripAnsi: false,
|
||||
config: {
|
||||
slowTestThreshold: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user