diff --git a/packages/server/lib/project-base.ts b/packages/server/lib/project-base.ts index c9eb60b855ef..7bab674d5cbd 100644 --- a/packages/server/lib/project-base.ts +++ b/packages/server/lib/project-base.ts @@ -30,6 +30,7 @@ import * as settings from './util/settings' import specsUtil from './util/specs' import system from './util/system' import Watchers from './watchers' +import stripAnsi from 'strip-ansi' import type { LaunchArgs } from './open_project' @@ -704,7 +705,7 @@ export class ProjectBase extends EE { return { ...browser, - warning: browser.warning || errors.getMsgByType('CHROME_WEB_SECURITY_NOT_SUPPORTED', browser.name), + warning: browser.warning || stripAnsi(errors.getMsgByType('CHROME_WEB_SECURITY_NOT_SUPPORTED', browser.name)), } }) } diff --git a/packages/server/test/unit/project_spec.js b/packages/server/test/unit/project_spec.js index 7cd5321d41c1..e149cbd3891a 100644 --- a/packages/server/test/unit/project_spec.js +++ b/packages/server/test/unit/project_spec.js @@ -1,5 +1,3 @@ -const { theme } = require('@packages/errors/src/errTemplate') - require('../spec_helper') const mockedEnv = require('mocked-env') @@ -248,7 +246,7 @@ describe('lib/project-base', () => { family: 'some-other-family', name: 'some-other-name', warning: `\ -Your project has set the configuration option: ${theme.yellow('chromeWebSecurity')} to ${theme.blue('false')} +Your project has set the configuration option: chromeWebSecurity to false This option will not have an effect in Some-other-name. Tests that rely on web security being disabled will not run as expected.\ `,