chore: hide 'markdown' reporter (#33140)
This commit is contained in:
parent
2e8e7a66cd
commit
b1fb4f16a7
|
@ -1,4 +1,4 @@
|
|||
export default {
|
||||
testDir: '../../tests',
|
||||
reporter: [['markdown'], ['html']]
|
||||
reporter: [[require.resolve('../../packages/playwright/lib/reporters/markdown')], ['html']]
|
||||
};
|
|
@ -276,7 +276,7 @@ export function toReporters(reporters: BuiltInReporter | ReporterDescription[] |
|
|||
return reporters;
|
||||
}
|
||||
|
||||
export const builtInReporters = ['list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob', 'markdown'] as const;
|
||||
export const builtInReporters = ['list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'] as const;
|
||||
export type BuiltInReporter = typeof builtInReporters[number];
|
||||
|
||||
export type ContextReuseMode = 'none' | 'when-possible';
|
||||
|
|
|
@ -25,7 +25,6 @@ import JSONReporter from '../reporters/json';
|
|||
import JUnitReporter from '../reporters/junit';
|
||||
import LineReporter from '../reporters/line';
|
||||
import ListReporter from '../reporters/list';
|
||||
import MarkdownReporter from '../reporters/markdown';
|
||||
import type { Suite } from '../common/test';
|
||||
import type { BuiltInReporter, FullConfigInternal } from '../common/config';
|
||||
import { loadReporter } from './loadUtils';
|
||||
|
@ -45,7 +44,6 @@ export async function createReporters(config: FullConfigInternal, mode: 'list' |
|
|||
junit: JUnitReporter,
|
||||
null: EmptyReporter,
|
||||
html: HtmlReporter,
|
||||
markdown: MarkdownReporter,
|
||||
};
|
||||
const reporters: ReporterV2[] = [];
|
||||
descriptions ??= config.config.reporter;
|
||||
|
|
|
@ -18,12 +18,14 @@ import fs from 'fs';
|
|||
import path from 'path';
|
||||
import { expect, test } from './playwright-test-fixtures';
|
||||
|
||||
const markdownReporter = require.resolve('../../packages/playwright/lib/reporters/markdown');
|
||||
|
||||
test('simple report', async ({ runInlineTest }) => {
|
||||
const files = {
|
||||
'playwright.config.ts': `
|
||||
module.exports = {
|
||||
retries: 1,
|
||||
reporter: 'markdown',
|
||||
reporter: ${JSON.stringify(markdownReporter)},
|
||||
};
|
||||
`,
|
||||
'dir1/a.test.js': `
|
||||
|
@ -83,7 +85,7 @@ test('custom report file', async ({ runInlineTest }) => {
|
|||
const files = {
|
||||
'playwright.config.ts': `
|
||||
module.exports = {
|
||||
reporter: [['markdown', { outputFile: 'my-report.md' }]],
|
||||
reporter: [[${JSON.stringify(markdownReporter)}, { outputFile: 'my-report.md' }]],
|
||||
};
|
||||
`,
|
||||
'a.test.js': `
|
||||
|
@ -107,7 +109,7 @@ test('report error without snippet', async ({ runInlineTest }) => {
|
|||
'playwright.config.ts': `
|
||||
module.exports = {
|
||||
retries: 1,
|
||||
reporter: 'markdown',
|
||||
reporter: ${JSON.stringify(markdownReporter)},
|
||||
};
|
||||
`,
|
||||
'a.test.js': `
|
||||
|
@ -135,7 +137,7 @@ test('report with worker error', async ({ runInlineTest }) => {
|
|||
'playwright.config.ts': `
|
||||
module.exports = {
|
||||
retries: 1,
|
||||
reporter: 'markdown',
|
||||
reporter: ${JSON.stringify(markdownReporter)},
|
||||
};
|
||||
`,
|
||||
'a.test.js': `
|
||||
|
|
Loading…
Reference in New Issue