Skip to content

test(sample/33): add e2e tests for graphql-mercurius sample#16584

Closed
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-33-graphql-mercurius-e2e
Closed

test(sample/33): add e2e tests for graphql-mercurius sample#16584
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-33-graphql-mercurius-e2e

Conversation

@mahmoodhamdi
Copy link
Copy Markdown

PR Checklist

  • Tests added for the changes
  • Tests pass (npm run test:e2e in sample directory)
  • Follows existing code patterns from other sample e2e tests

Description

Add end-to-end tests for sample 33-graphql-mercurius:

  • Query recipes: Verifies list of recipes is returned via GraphQL query
  • Query recipe by id: Verifies single recipe lookup by id
  • Mutation addRecipe: Verifies recipe creation via GraphQL mutation
  • Mutation removeRecipe: Verifies recipe removal returns true

Uses FastifyAdapter with --experimental-vm-modules flag required by Mercurius, and overrides RecipesService with mock data.

Test Output

Test Suites: 1 passed, 1 total
Tests:       4 passed, 4 total

Add e2e tests for the graphql-mercurius sample application:
- Query recipes: verify list of recipes is returned via GraphQL
- Query recipe by id: verify single recipe lookup
- Mutation addRecipe: verify recipe creation via GraphQL mutation
- Mutation removeRecipe: verify recipe removal returns true

Uses --experimental-vm-modules flag required by Mercurius.

Co-Authored-By: Mahmoud Hamdi <hmdy7486@gmail.com>
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 42b2e765-7ca1-4b3b-ba36-d552d706eee6

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.841%

Totals Coverage Status
Change from base Build d8b80ff4-1c32-4569-a75c-00480f0069ab: 0.0%
Covered Lines: 7473
Relevant Lines: 8318

💛 - Coveralls

@kamilmysliwiec
Copy link
Copy Markdown
Member

#16391

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.

3 participants