Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ ui/mobile/allure-report/
# Test artifacts (keep test runners in build/, exclude temp results)
TEST_SUMMARY.md
TESTING_LOG.md
/.tmp-script-contracts-*
/.tmp-allure-pages-utils-*

# Next.js
/.next/
Expand Down
4 changes: 3 additions & 1 deletion scripts/allure-pages-utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
process.platform === "win32" ? "junction" : "dir",
);
fs.rmSync(danglingTarget, { recursive: true, force: true });
assert.throws(() => ensureWithinWorkspace(danglingLink, "--output"));
assert.throws(() => ensureWithinWorkspace(danglingLink, "--output"), {

Check warning on line 77 in scripts/allure-pages-utils.test.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

scripts/allure-pages-utils.test.js#L77

Avoid trailing commas in object or array literals
code: "ENOENT",
});
});

test("readJson does not turn an unsafe path into a fallback value", () => {
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate-allure-report-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
const files = Array.isArray(currentArgs) ? currentArgs : [currentArgs];
return files
.filter(Boolean)
.map((filePath) => readJson(filePath, null))
.map((filePath) =>
readJson(ensureWithinWorkspace(filePath, "--current"), null)

Check warning on line 38 in scripts/generate-allure-report-index.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

scripts/generate-allure-report-index.js#L38

Unallowed use of `null` or `undefined`
)
.filter((payload) => payload?.path);
};

const main = () => {
const args = parseArgs(process.argv);
const current = readCurrentReports(args.current);
const existing = readExistingReports(
args.existing ? ensureWithinWorkspace(args.existing, "--existing") : ""
);
const existing = readExistingReports(args.existing || "");

Check warning on line 46 in scripts/generate-allure-report-index.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

scripts/generate-allure-report-index.js#L46

ES2015 block-scoped variables are forbidden.
const outputDir = ensureWithinWorkspace(args.output || ".pages-index", "--output");
const templatePath = ensureWithinWorkspace(
args.template || ".github/pages/allure-reports-index.html",
Expand Down