Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
same
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsaylevine committed Jan 8, 2021
1 parent 400b24f commit 44ae8af
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions tests/configurableDirs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,24 @@ describe("clean up of NoN files", () => {
];
// tested equality this way because of windows :)
const fileListFunctions = fileList.split("---")[0].trim().split("\n");
expect(fileListFunctions.join("").trim()).toEqual(nextFunctions.join("").trim());
const publishFiles = [
"404.html",
"_next",
"_redirects",
"getStaticProps",
"static",
"static.html",
];
const fileListPublish = fileList.split("---")[1].trim().split("\n");
expect(fileListPublish.join("")).toEqual(publishFiles.join(""));
const isSameList = nextFunctions.reduce((isSame, func) => {
if (fileListFunctions.includes(func)) {
isSame = true;
} else {
isSame = false;
}
return isSame;
}, true);
expect(isSameList).toBe(true);
// const publishFiles = [
// "404.html",
// "_next",
// "_redirects",
// "getStaticProps",
// "static",
// "static.html",
// ];
// const fileListPublish = fileList.split("---")[1].trim().split("\n");
// expect(fileListPublish.join("")).toEqual(publishFiles.join(""));
});
});

0 comments on commit 44ae8af

Please sign in to comment.