Repository navigation
test: add end-to-end test spanning order, kitchen, and notification - #8
Merged
Merged
Conversation
New tests/e2e workspace package wires all three services together in one test: one Postgres container hosting all 3 service databases (same shape as docker/init.sql), one shared RabbitMQ + Redis container, each service's real entrypoint imported in sequence. A real POST /orders drives the full happy path; the test polls both kitchen's and notification's own databases until it completes. This is the last item on the testing pyramid - every phase of the build plan is now done. Also fixes how the whole suite runs together: bun test from the repo root executes every test file in one process by default, and since each service's db.ts reads DATABASE_URL from process.env once at module-load time, a later test file could pick up an already-cached module pointing at an earlier file's stopped container. Each package with tests now has its own "test" script, and the root script runs them via bun's workspace filter (one OS process per package), which is real isolation rather than just module-context isolation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Also fixes
bun run --filter '*' --sequential test), which spawns each package's tests as a genuinely separate OS process. CI's test step updated to match.Test plan
bun run typecheckgreen across all services, including the new tests/e2e projectbun run testfrom the repo root: every package's suite passes (order 4, kitchen 2, notification 2, menu 2, shared 2, e2e 1 - 13 total)