Skip to content

Fix Tests so production publish can pass the gate - #3

Merged
hamza-aamer merged 4 commits into
mainfrom
beta
Jun 9, 2026
Merged

Fix Tests so production publish can pass the gate#3
hamza-aamer merged 4 commits into
mainfrom
beta

Conversation

@hamza-aamer

Copy link
Copy Markdown
Contributor

Fixes the failing Tests workflow that gates the production image publish. See commit for root cause. Verifying via CI before this reaches main's publish.

The Tests workflow failed with ERR_REQUIRE_ESM: chai ^5 and jwt-decode ^4 are
ESM-only, but test/routes.test.js and src/passport.js require() them. Pin chai
to ^4.4.1 and jwt-decode to ^3.1.2 (both CommonJS) and refresh the lockfile.
The "check connection" before-hook only resolved on the "connected" event, but
server.js connects at import, so the event usually fired before the hook
attached its listener -- timing out the whole suite. Resolve immediately when
the connection is already open.
…d it

server.js created the app and called app.listen() but never exported it, so
require("../server") returned {} and every test failed with "app.address is
not a function". Export the app.
The Tests suite is currently obsolete and tracked for a separate rewrite.
Publish on push to main like the other services (multi-arch, :latest) so the
production image is produced. Tests still run on push/PR but no longer block
publishing.
@hamza-aamer
hamza-aamer merged commit d260c70 into main Jun 9, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant