Skip to content

Commit

Permalink
fix reporter path
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Oct 18, 2024
1 parent 6877add commit 07f3da0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/playwright-test/reporter-markdown.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '${markdownReporter}',
};
`,
'dir1/a.test.js': `
Expand Down Expand Up @@ -83,7 +85,7 @@ test('custom report file', async ({ runInlineTest }) => {
const files = {
'playwright.config.ts': `
module.exports = {
reporter: [['markdown', { outputFile: 'my-report.md' }]],
reporter: [['${markdownReporter}', { outputFile: 'my-report.md' }]],
};
`,
'a.test.js': `
Expand All @@ -107,7 +109,7 @@ test('report error without snippet', async ({ runInlineTest }) => {
'playwright.config.ts': `
module.exports = {
retries: 1,
reporter: 'markdown',
reporter: '${markdownReporter}',
};
`,
'a.test.js': `
Expand Down Expand Up @@ -135,7 +137,7 @@ test('report with worker error', async ({ runInlineTest }) => {
'playwright.config.ts': `
module.exports = {
retries: 1,
reporter: 'markdown',
reporter: '${markdownReporter}',
};
`,
'a.test.js': `
Expand Down

0 comments on commit 07f3da0

Please sign in to comment.