diff --git a/tests/playwright-test/list-mode.spec.ts b/tests/playwright-test/list-mode.spec.ts index e8b8923c6cfa9..1388b38dd9e30 100644 --- a/tests/playwright-test/list-mode.spec.ts +++ b/tests/playwright-test/list-mode.spec.ts @@ -196,3 +196,21 @@ test('should report errors with location', async ({ runInlineTest }) => { column: 9, }); }); + +test('should list tests once', async ({ runInlineTest }) => { + test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/27087' }); + const result = await runInlineTest({ + 'playwright.config.ts': ` + module.exports = { }; + `, + 'a.test.js': ` + const { test, expect } = require('@playwright/test'); + test('test 1', ({}) => {}); + ` + }, { 'list': true }); + expect(result.exitCode).toBe(0); + expect(result.output).toEqual(`Listing tests: + a.test.js:3:7 › test 1 +Total: 1 test in 1 file +`); +}); diff --git a/tests/playwright-test/reporter.spec.ts b/tests/playwright-test/reporter.spec.ts index c7805e4208399..485d029d5ce82 100644 --- a/tests/playwright-test/reporter.spec.ts +++ b/tests/playwright-test/reporter.spec.ts @@ -796,24 +796,5 @@ var import_test = __toModule(require("@playwright/test")); | ^ 4 | `); }); - - test('should list tests once', async ({ runInlineTest }) => { - test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/27087' }); - test.skip(useIntermediateMergeReport); - const result = await runInlineTest({ - 'playwright.config.ts': ` - module.exports = { }; - `, - 'a.test.js': ` - const { test, expect } = require('@playwright/test'); - test('test 1', ({}) => {}); - ` - }, { '--list': true }); - expect(result.exitCode).toBe(0); - expect(result.output).toEqual(`Listing tests: - a.test.js:3:11 › test 1 -Total: 1 test in 1 file -`); - }); }); } \ No newline at end of file