Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Sep 15, 2023
1 parent 05ae04e commit e85cad4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
18 changes: 18 additions & 0 deletions tests/playwright-test/list-mode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
`);
});
19 changes: 0 additions & 19 deletions tests/playwright-test/reporter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
`);
});
});
}

0 comments on commit e85cad4

Please sign in to comment.