Skip to content

test(sample/11): add e2e tests for swagger sample#16580

Closed
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-11-swagger-e2e
Closed

test(sample/11): add e2e tests for swagger sample#16580
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-11-swagger-e2e

Conversation

@mahmoodhamdi
Copy link

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 11-swagger:

  • POST /cats: Verifies cat creation returns the created entity with correct fields
  • GET /cats/:id: Verifies finding a cat by index returns the expected cat
  • GET /api-json: Verifies Swagger JSON document is served with correct OpenAPI spec, title, and paths

Test Output

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

Add e2e tests for the swagger sample application:
- POST /cats: verify cat creation returns the created entity
- GET /cats/:id: verify finding a cat by index
- GET /api-json: verify Swagger JSON document is served with correct OpenAPI spec

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

Pull Request Test Coverage Report for Build f5a657cf-2dec-4dbc-ac50-52902cb57c95

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
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