@cacheable/node-cache: move store tests to use @faker-js/faker#1641
Merged
Conversation
…er in store tests
Replace all hardcoded string keys/values ("test", "value", "foo", "bar", etc.)
with faker-generated data (faker.string.uuid(), faker.lorem.word(), etc.) for
consistency with index.test.ts and the rest of the monorepo.
https://claude.ai/code/session_01Xba73Vg7fi24yVik8zSjVT
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the test suite in packages/node-cache/test/store.test.ts to use dynamic test data generated by faker instead of hardcoded strings and values. The review feedback suggests improving several assertions on mget results by using toEqual with dynamic object keys rather than checking individual properties, which provides stricter and more robust assertions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1641 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 2497 2497
Branches 556 554 -2
=========================================
Hits 2497 2497 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ore tests Address review feedback: use toEqual with full object assertions instead of checking individual properties on mget results, ensuring no unexpected keys. https://claude.ai/code/session_01Xba73Vg7fi24yVik8zSjVT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"test","value","foo","bar","test1","value1","Alice","Bob", etc.) instore.test.tswith@faker-js/fakercalls (faker.string.uuid(),faker.lorem.word(),faker.person.firstName(),faker.number.int())store.test.tswithindex.test.tswhich already used faker throughout__proto__key) intentionally left with hardcoded values since they test a specific keyTest plan
https://claude.ai/code/session_01Xba73Vg7fi24yVik8zSjVT
Generated by Claude Code