Skip to content

Replace placeholder Jest test with baseline utility coverage #10

Description

@alx-so

Problem

The test suite exists but currently has no implemented coverage. The only test is a placeholder, so yarn test can pass without exercising the library behavior.

Start with pure utility and hook-adjacent logic because these tests are fast, deterministic, and do not require a rendered React Native environment.

Impact

Baseline unit coverage gives bug-fix PRs an immediate regression signal before component-level tests are expanded.

Code references

  • src/__tests__/index.test.tsx#L1: placeholder test should be replaced or removed once real tests exist.
  • src/common/composePartialTextNode.tsx#L3-L25: match-tag rendering and tag stripping helpers.
  • src/components/Input/utils.ts#L5-L30: input value normalization and tag composition helpers.
  • src/components/Select/utils.ts#L5-L31: multi-value selection helpers.
  • src/hooks/useSearch.ts#L13-L59: search result mapping and match highlighting behavior.

Acceptance criteria

  • Placeholder-only test file is replaced by meaningful tests or removed after real tests exist.
  • Tests cover removeTags, composeValue, composeTags, removeItemFromMultipleValue, and isItemSelected.
  • Tests cover search matching and highlighted-label output for a stable item list.
  • Tests are deterministic and do not depend on wall-clock generated IDs unless time is mocked.
  • Tests run through the existing Jest command without starting an app server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: inputInput and TextInput behaviorarea: multiselectMultiple selection and tag behaviorarea: searchSearch and autocomplete behaviorarea: testsAutomated test coverage and test configurationenhancementNew feature or requestpriority: criticalMust fix before the next releasetype: testingTest infrastructure and coverage work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions