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