Skip to content

Conversation

@sukdev24
Copy link
Contributor

This contribution adds unit tests for the utils.compileETag() function in test/utils.js.

The tests verify behavior for:

  • true, false, "strong", "weak" input values
  • Invalid input types (array, object)
  • Unrecognized strings

These tests improve coverage and support new contributors reviewing ETag logic.

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sukdev24 thanks for helping the project! Can you run npm run lint -- --fix to solve the linting issues and commit the changes?

@sukdev24
Copy link
Contributor Author

sukdev24 commented May 27, 2025 via email

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve updated the tests so that instead of only checking whether it’s a function, they verify the behavior based on what it should return.

@bjohansebas bjohansebas changed the title Added unit tests for utils.compileETag to cover valid and invalid inputs test: added unit tests for utils.compileETag to cover valid and invalid inputs Jan 17, 2026
@bjohansebas bjohansebas added tests semver-ignore This change does not have any impact in semver (docs, tooling, etc..) labels Jan 17, 2026
@bjohansebas bjohansebas merged commit 912893c into expressjs:master Jan 17, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-ignore This change does not have any impact in semver (docs, tooling, etc..) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants