Skip to content

Commit

Permalink
Resolve module issue and missing data folder (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb authored Jun 11, 2022
1 parent 89c3d0f commit acad132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/merge-reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ async function mergeHTMLReports(inputReportPaths: string[], givenConfig: Config

const contentFolderName = "data";
const contentFolderPath = `${reportDir}/${contentFolderName}/`;
const contentFiles = await readdir(contentFolderPath);
let contentFiles = [];

try {
await readdir(contentFolderPath);
} catch (e) {
// No-op
}

await Promise.all(
contentFiles.map(async (fileName) => {
Expand Down Expand Up @@ -132,10 +138,7 @@ async function mergeHTMLReports(inputReportPaths: string[], givenConfig: Config
}

const appFolder = path.join(
require.resolve("@playwright/test"),
"..",
"node_modules",
"playwright-core",
path.dirname(require.resolve("playwright-core")),
"lib",
"webpack",
"htmlReport"
Expand Down Expand Up @@ -163,10 +166,7 @@ async function mergeHTMLReports(inputReportPaths: string[], givenConfig: Config
await appendFile(indexFile, '";</script>');

const traceViewerFolder = path.join(
require.resolve("@playwright/test"),
"..",
"node_modules",
"playwright-core",
path.dirname(require.resolve("playwright-core")),
"lib",
"webpack",
"traceViewer"
Expand Down
3 changes: 0 additions & 3 deletions src/utils.ts

This file was deleted.

0 comments on commit acad132

Please sign in to comment.