Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion block/internal/cache/generic_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func TestCache_DeleteAllForHeight(t *testing.T) {
assert.True(t, c.isSeen("hash2"))
}

// TestCacheWithConfig tests creating cache with custom config
// TestCache_WithNilStore tests creating cache with nil store
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Thank you for fixing the mismatched comment. To further improve clarity, consider making the comment explain the purpose of the test rather than repeating what is already clear from the function name. A more descriptive comment explaining the 'why' of the test would be more helpful for future readers and is consistent with other high-quality test comments in this file.

Suggested change
// TestCache_WithNilStore tests creating cache with nil store
// TestCache_WithNilStore verifies that the cache operates correctly without a backing store.

func TestCache_WithNilStore(t *testing.T) {
// Cache without store should work fine
c := NewCache[testItem](nil, "")
Expand Down
Loading