Skip to content

test(cache): verify TTLCache behavior for deeply nested object values (Variation 2) #1405

@souravjhahind

Description

@souravjhahind

🧩 Background

The existing cache implementation must handle boundary inputs robustly. Currently, tests do not comprehensively cover extreme values.

🎯 Objective

Add a specific test to verify cache behavior for deeply nested object values.

📁 Files to touch

  • lib/cache.test.ts

🛠️ Implementation steps

  • Assert that setting a value with { level1: { level2: { level3: 'value' } } } serializes without serialization loop crashes.
  • Verify verify deeply nested objects do not crash the cache serializer.
  • Run Vitest to ensure the test coverage is successfully verified.

✅ Definition of done

  • 1 new test case targeting this boundary in cache.
  • All cache test suites pass successfully.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions