test(sample/10): add e2e tests for fastify sample#16576
Closed
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
Closed
test(sample/10): add e2e tests for fastify sample#16576mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
Conversation
Add e2e tests to the Fastify platform sample application:
- Test that GET /cats returns all cats wrapped by
the global TransformInterceptor in { data } format
- Uses FastifyAdapter matching the sample's runtime configuration
- Add jest-e2e.json configuration for the test runner
- Update test:e2e script in package.json to use jest config
Pull Request Test Coverage Report for Build 7f7c9e5f-f7d6-440c-af10-5840e83701e6Details
💛 - Coveralls |
Member
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.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The
sample/10-fastifyapplication has no e2e tests. Thetest:e2escript inpackage.jsonoutputs "No e2e tests implemented yet."What is the new behavior?
Added an e2e test for the Fastify platform sample that verifies:
GET /catsreturns all cats wrapped by the globalTransformInterceptorin the{ data: [...] }formatFastifyAdaptermatching the sample's runtime configurationCatsServiceis overridden with a mock to isolate the test from data persistenceAlso updated the
test:e2escript to use the jest configuration.Does this PR introduce a breaking change?