Skip to content

test : added pytest unit tests for loggingAnomaly module#1885

Open
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1876
Open

test : added pytest unit tests for loggingAnomaly module#1885
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1876

Conversation

@tmdeveloper007

@tmdeveloper007 tmdeveloper007 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

test : added vitest unit tests for loggingAnomaly middleware

Changes

Test coverage for the relevant module/middleware.

Impact

No production changes. Test coverage only.

Closes ##1876

Note

Assign to tmdeveloper007

- Test that next() is called to pass control to next middleware
- Test finish event listener is registered on the response
- Test request metadata is logged on normal completion
- Test anomaly warning is logged when duration exceeds 500ms
- Test anomaly warning is logged when status code is 500 or higher
- Test no anomaly warning for fast successful requests
@github-actions github-actions Bot added the type:security Vulnerability fixes or security-related enhancements. label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:security Vulnerability fixes or security-related enhancements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant