Skip to content

test: add unit tests for sensitive data masking (masker) #1

Description

@tanmayjoddar

Why

We rely on masking to ensure secrets never get written to disk. There are currently no tests for src/core/masker.js.

Scope

Add a Jest test file that covers key redaction + value-pattern redaction.

Where

  • src/core/masker.js
  • Add: tests/core/masker.test.js

Acceptance Criteria

  • Tests cover redacting keys like token, password, secret, authorization, api_key
  • Tests cover redacting JWT-like values and credit-card-like values
  • Tests cover nested objects + arrays
  • npm test passes

Notes

Current implementation mutates the input object; tests should reflect current behavior unless you decide to change it (then update callers accordingly).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for first-time contributorsgssocGSSoC

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions