Skip to content

Commit 1f579d7

Browse files
committed
e2e test
1 parent a7a9f3c commit 1f579d7

File tree

1 file changed

+17
-0
lines changed
  • scripts/webframeworks-deploy-tests

1 file changed

+17
-0
lines changed

scripts/webframeworks-deploy-tests/tests.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,23 @@ describe("webframeworks", function (this) {
388388
expect(unmatchedFiles, "matchedFiles").to.eql([]);
389389
expect(unmatchedExpectations, "unmatchedExpectations").to.eql([]);
390390
});
391+
392+
it("should not have development files to be deployed", async () => {
393+
const distDir = ".next";
394+
395+
const UNEXPECTED_PATTERNS = [
396+
`${distDir}\/cache\/.*-development`,
397+
`${distDir}\/cache\/eslint`,
398+
].map((it) => new RegExp(it));
399+
400+
const files = await getFilesListFromDir(`${NEXT_OUTPUT_PATH}/functions/${distDir}`);
401+
402+
const filesContainingUnexpectedPatterns = UNEXPECTED_PATTERNS.filter((unexpectedPattern) =>
403+
files.some((file) => file.match(unexpectedPattern)),
404+
);
405+
406+
expect(filesContainingUnexpectedPatterns.length).to.eql(0);
407+
});
391408
});
392409

393410
describe("angular", () => {

0 commit comments

Comments
 (0)