From 46a2322814c90fb79fd98d1ce4c2200b5206198c Mon Sep 17 00:00:00 2001 From: Nick Szaunig Date: Tue, 22 Sep 2026 02:22:09 +0200 Subject: [PATCH] fix: restore the e2e suite, which could not compile at all test/jest-e2e.json listed the ESM-only packages ts-jest must still transform, but @nestjs/schedule (12.0.1, "type": "module") was not among them. Since AppModule imports ScheduleModule for the backup scheduler, every e2e spec died on "SyntaxError: Unexpected token 'export'" while loading AppModule - the whole suite, not one test. That silently disabled test/authorization-coverage.e2e-spec.ts, the check that asserts every non-public route carries @RequirePermission or @AnyAuthenticatedUser. It is exactly the check that would have caught the displaced decorators fixed in the previous commit, and it had been dead since the scheduler shipped. With @nestjs/schedule and its cron dependencies added to the allowlist, the authorization-coverage spec compiles and passes, confirming no route is left undecorated. The remaining 36 e2e specs still need a Postgres instance on the port .env.test points at; they fail on connection, not on code. Co-Authored-By: Claude Opus 5 --- ApiCore-Backend/test/jest-e2e.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApiCore-Backend/test/jest-e2e.json b/ApiCore-Backend/test/jest-e2e.json index 5399989..6460e3e 100644 --- a/ApiCore-Backend/test/jest-e2e.json +++ b/ApiCore-Backend/test/jest-e2e.json @@ -9,6 +9,6 @@ "^.+\\.(t|j)s$": "ts-jest" }, "transformIgnorePatterns": [ - "node_modules/(?!(otplib|@otplib|@scure|@noble|openid-client|oauth4webapi|jose)/)" + "node_modules/(?!(otplib|@otplib|@scure|@noble|openid-client|oauth4webapi|jose|@nestjs/schedule|cron|croner|uuid)/)" ] }