mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: clear message for no reports (#23492)
This commit is contained in:
parent
3a00fc4edf
commit
ceaa29cec1
@ -26,6 +26,8 @@ import { Multiplexer } from './multiplexer';
|
|||||||
|
|
||||||
export async function createMergedReport(config: FullConfigInternal, dir: string, reporterDescriptions: ReporterDescription[], resolvePaths: boolean) {
|
export async function createMergedReport(config: FullConfigInternal, dir: string, reporterDescriptions: ReporterDescription[], resolvePaths: boolean) {
|
||||||
const shardFiles = await sortedShardFiles(dir);
|
const shardFiles = await sortedShardFiles(dir);
|
||||||
|
if (shardFiles.length === 0)
|
||||||
|
throw new Error(`No report files found in ${dir}`);
|
||||||
const events = await mergeEvents(dir, shardFiles);
|
const events = await mergeEvents(dir, shardFiles);
|
||||||
if (resolvePaths)
|
if (resolvePaths)
|
||||||
patchAttachmentPaths(events, dir);
|
patchAttachmentPaths(events, dir);
|
||||||
|
@ -965,3 +965,11 @@ test('same project different suffixes', async ({ runInlineTest, mergeReports })
|
|||||||
expect(exitCode).toBe(0);
|
expect(exitCode).toBe(0);
|
||||||
expect(output).toContain(`projects: [ 'foo-first', 'foo-second' ]`);
|
expect(output).toContain(`projects: [ 'foo-first', 'foo-second' ]`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('no reports error', async ({ runInlineTest, mergeReports }) => {
|
||||||
|
const reportDir = test.info().outputPath('blob-report');
|
||||||
|
fs.mkdirSync(reportDir, { recursive: true });
|
||||||
|
const { exitCode, output } = await mergeReports(reportDir);
|
||||||
|
expect(exitCode).toBe(1);
|
||||||
|
expect(output).toContain(`No report files found in`);
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user