Skip to content

test(mask-sensitive): add unit tests for nested objects and array val… - #721

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Killerjunior:test/641-mask-sensitive-nested-array-tests
Jul 29, 2026
Merged

test(mask-sensitive): add unit tests for nested objects and array val…#721
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Killerjunior:test/641-mask-sensitive-nested-array-tests

Conversation

@Killerjunior

Copy link
Copy Markdown
Contributor

Summary

Closes #641

  • Added unit test coverage for the maskSensitive helper handling nested objects, arrays of objects, preserved non-sensitive keys, and 3-level deep nesting.
  • Verified masking of sensitive keys (url, callback, webhook_url) inside nested objects (e.g. { webhook: { url: '...' } }) and array elements (e.g. { hooks: [{ callback: 'x' }, { callback: 'y' }] }).
  • Confirmed non-sensitive nested keys (e.g. { meta: { count: 5 } }) remain unchanged and 3-level deep nesting is masked recursively without mutating original inputs.

Testing

  • Unit tests: jest src/utils/mask-sensitive.utils.test.ts (25/25 passing)
  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Killerjunior Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 8264dc5 into accesslayerorg:main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants