Skip to content

test: cover non-object preference payload edge cases - #18

Closed
YRWoods wants to merge 2 commits into
TuYv:masterfrom
YRWoods:test/preferences-non-object-edge
Closed

test: cover non-object preference payload edge cases#18
YRWoods wants to merge 2 commits into
TuYv:masterfrom
YRWoods:test/preferences-non-object-edge

Conversation

@YRWoods

@YRWoods YRWoods commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Two focused regression tests for normalizeSearchPreferences edge cases that were not covered.

Problem

Fixes #11 — requested one untested preference edge case.

Approach

  • Non-object payloads (null, string, number, boolean, array) → full defaults, no throw
  • Unknown keys must not appear on the normalized object
  • No production code change

How I tested

Checklist

Add regression tests for normalizeSearchPreferences when given
null/string/number/array inputs and for unknown keys being ignored.

Fixes #11

@TuYv TuYv left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for adding regression coverage and for documenting the uncovered case on #11 first. The non-object payload test is on target and the full suite passes locally.

Please keep this PR to the one focused behavior requested by #11. It currently adds a second, independently named behavior for unknown-key stripping. Please remove that second test from this PR, or move it to a separate follow-up issue/PR, so this change remains limited to non-object preference payloads.

@YRWoods

YRWoods commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed review: removed the second unknown-key stripping test. This PR is only the non-object payload coverage for #11.

@YRWoods

YRWoods commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Ready for re-review: dropped the second unknown-key test; PR is only non-object preference payloads for #11.

@YRWoods

YRWoods commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Re-review ready: second unknown-key stripping test removed in f644641. Diff is only the non-object preference payload test for #11.

@YRWoods

YRWoods commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Withdrawing.

@YRWoods YRWoods closed this Jul 14, 2026
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.

test: cover an untested search preference edge case

2 participants