From 288f9dcc101bac1418dd1d84599f413b6cf387ea Mon Sep 17 00:00:00 2001 From: "David A. Ramos" Date: Sun, 2 Jul 2023 15:23:15 -0700 Subject: [PATCH] [cypress] Disable debug colors within Cypress integration tests The `debug` library only prints timestamped output when terminal colors are disabled. We disable colors here so that we can better understand the timing of failed test runs. Note that DEBUG_COLORS is still enabled for the Jest tests that invoke the Cypress plugin integration tests, since GitHub Actions lets us show timestamps for each line of that output even if colors are enabled. However, output from individual test cases is buffered and printed all at once in the event of a test failure, so the buffered output needs to include timestamps if we want to understand the timing within a single Cypress invocation. --- packages/cypress-plugin/test/integration/src/run-test-case.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/cypress-plugin/test/integration/src/run-test-case.ts b/packages/cypress-plugin/test/integration/src/run-test-case.ts index bf8fa83..ec014bc 100644 --- a/packages/cypress-plugin/test/integration/src/run-test-case.ts +++ b/packages/cypress-plugin/test/integration/src/run-test-case.ts @@ -855,8 +855,6 @@ export const runTestCase = async ( const env = { ...params.envVars, DEBUG: process.env.TEST_DEBUG, - // Enable terminal colors for debug() output. - DEBUG_COLORS: "1", // Ensure Cypress prints output with TTY colors. FORCE_COLOR: "1", // NODE_OPTIONS: "--loader=testdouble",