Skip to content

test : added unit tests for lib/request-id module - #6

Open
tmdeveloper007 wants to merge 2 commits into
mainfrom
#8421
Open

tmdeveloper007 wants to merge 2 commits into
mainfrom
#8421

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Owner

Summary of What Has Been Done

Created lib/request-id.test.ts with unit tests covering:

  • Returns the x-request-id header value when the header is present
  • Returns null when the header is absent
  • Returns null when the header value is an empty string
  • Calls headers() with no arguments (no parameter passed)

Mocked next/headers using vi.mock.

Changes Made

  • New file: lib/request-id.test.ts

Impact it Made

Adds first unit test coverage for the request-id module, supporting request tracing and debugging use cases.

Closes #8421.

Note: please assign this PR to the tmdeveloper007 account.

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