Skip to content

Add unit tests for maskSensitive helper covering nested objects and array values #641

Description

@Chucks1093

Summary

The maskSensitive helper has tests for flat objects but no coverage for nested objects or arrays containing objects with sensitive keys. Both cases appear in real log context payloads and need to be handled correctly.

Scope

  • Test nested object: { webhook: { url: 'https://example.com' } }url masked inside the nested object
  • Test array of objects: { hooks: [{ callback: 'x' }, { callback: 'y' }] } → both callback values masked
  • Test non-sensitive nested key unchanged: { meta: { count: 5 } }count value preserved
  • Test deeply nested sensitive key (3 levels) is masked

Acceptance Criteria

  • Sensitive keys in nested objects are masked
  • Sensitive keys inside array items are masked
  • Non-sensitive nested keys unchanged
  • Three-level nesting handled correctly

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions