From a07afe4762bf5e137593c24ea8e88911dbaa7a99 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:10:31 +0800 Subject: [PATCH] Update pr.test.js --- tests/pr.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pr.test.js b/tests/pr.test.js index 7c3f8ebd9..dcc6ca21f 100644 --- a/tests/pr.test.js +++ b/tests/pr.test.js @@ -51,13 +51,13 @@ t("New JSON files must be owned by the PR author", async (t) => { const headDomainsFiles = await fs.readdir(headDomainsPath); - const newFiles = MODIFIED_FILES.filter((file) => !headDomainsFiles.includes(file)); + const newFiles = MODIFIED_FILES.filter((file) => !headDomainsFiles.includes(file.substring(file.lastIndexOf("/") + 1))); console.log("New files", newFiles); await Promise.all( newFiles.map(async (file) => { - const domain = await getFileContent(domainsPath, file); + const domain = await getFileContent(domainsPath, file.substring(file.lastIndexOf("/") + 1)); if (!domain) { t.fail(`${file}: Unable to read domain data`);