mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-11 12:33:45 +03: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) {
|
||||
const shardFiles = await sortedShardFiles(dir);
|
||||
if (shardFiles.length === 0)
|
||||
throw new Error(`No report files found in ${dir}`);
|
||||
const events = await mergeEvents(dir, shardFiles);
|
||||
if (resolvePaths)
|
||||
patchAttachmentPaths(events, dir);
|
||||
|
@ -965,3 +965,11 @@ test('same project different suffixes', async ({ runInlineTest, mergeReports })
|
||||
expect(exitCode).toBe(0);
|
||||
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…
Reference in New Issue
Block a user