-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: split output clients by capabilities and base dir #34135
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
import fs from 'fs'; | ||
import path from 'path'; | ||
import type { FullConfig, TestCase, Suite, TestResult, TestError, TestStep, FullResult, Location, JSONReport, JSONReportSuite, JSONReportSpec, JSONReportTest, JSONReportTestResult, JSONReportTestStep, JSONReportError } from '../../types/testReporter'; | ||
import { formatError, prepareErrorStack, resolveOutputFile } from './base'; | ||
import { formatError, nonTerminalScreen, prepareErrorStack, resolveOutputFile } from './base'; | ||
import { MultiMap, toPosixPath } from 'playwright-core/lib/utils'; | ||
import { getProjectId } from '../common/config'; | ||
import type { ReporterV2 } from './reporterV2'; | ||
|
@@ -222,7 +222,7 @@ class JSONReporter implements ReporterV2 { | |
} | ||
|
||
private _serializeError(error: TestError): JSONReportError { | ||
return formatError(error, true); | ||
return formatError(nonTerminalScreen, error); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a behavior change. Previously, we were always coloring the code snippet, and now we do it conditionally based on isTTY/PLAYWRIGHT_FORCE_TTY/FORCE_COLOR/DEBUG_COLORS. Noticing here to figure out whether this is intentional. |
||
} | ||
|
||
private _serializeTestStep(step: TestStep): JSONReportTestStep { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid changing the global
terminalScreen.colors
and messing up other reporters: