Skip to content

test(server): return 404 for unknown routes#839

Open
Kritagya123611 wants to merge 1 commit intovercel:mainfrom
Kritagya123611:test/404-unknown-route
Open

test(server): return 404 for unknown routes#839
Kritagya123611 wants to merge 1 commit intovercel:mainfrom
Kritagya123611:test/404-unknown-route

Conversation

@Kritagya123611
Copy link

What does this PR do?

This PR adds a unit test to ensure the server correctly responds with a 404 status code when an unknown route is requested.

Why is this needed?

Handling unknown routes explicitly is an important part of predictable server behavior.
This test improves coverage and helps prevent regressions where undefined routes might return incorrect responses.

Changes made

  • Added a new test case that starts the server
  • Sends a request to an unknown endpoint
  • Asserts that the response status is 404

Testing

  • Tests can be run locally using pnpm test

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