Skip to content

feat(tests): add vitest test suite#420

Open
csandman wants to merge 5 commits into
v5from
add-test-suite
Open

feat(tests): add vitest test suite#420
csandman wants to merge 5 commits into
v5from
add-test-suite

Conversation

@csandman
Copy link
Copy Markdown
Owner

Summary

  • Ports the full react-select upstream test suite (select, async-select, creatable-select, async-creatable-select, state-managed-select) adapted for Chakra v2 and vitest
  • Adds chakra-specific.test.tsx covering size, variant, isInvalid, isReadOnly, isDisabled, chakraStyles, tagColorScheme, selectedOptionStyle, selectedOptionColorScheme, focusBorderColor, and useChakraSelectProps
  • Adds full vitest + @testing-library/react infrastructure (vitest.config.ts, src/tests/setup.ts, src/tests/render.tsx, src/tests/cases.ts, src/tests/constants.ts)
  • Fixes pointerEvents: "none" on the DropdownIndicator container — inherited from Chakra v2's native Select icon theme, it had no purpose here and blocked pointer interaction
  • Ports oxlint vitest plugin rules and test-file overrides from main
  • Adds dedicated test.yml CI workflow (Node 20 & 24 matrix)
  • Ports remaining consistency tweaks from main: lint-staged test-file filter, oxfmt ignore patterns, CONTRIBUTING.md Tests section, pnpm test step in publish workflow, lint:publish in lint workflow

Test plan

  • pnpm test passes (272 tests, 4 skipped)
  • pnpm lint passes with no new warnings
  • CI runs green on both Node 20 and 24

🤖 Generated with Claude Code

csandman and others added 4 commits May 27, 2026 23:24
Chakra v2's Select theme spreads `selectStyles.icon` onto the dropdown
indicator container, which includes `pointerEvents: "none"` (needed in
the native <select> to pass clicks through to the underlying element).
That value has no purpose here and blocked userEvent from interacting
with the indicator in tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ports the react-select upstream test suite and adds chakra-specific
tests covering size, variant, isInvalid, isReadOnly, chakraStyles,
tagColorScheme, selectedOptionStyle, selectedOptionColorScheme,
focusBorderColor, and the useChakraSelectProps hook.

Adds vitest + @testing-library/* infrastructure, oxlint vitest plugin
rules, and a dedicated test.yml CI workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- lintstagedrc: filter src/tests/ before invoking oxlint to prevent
  "No files found" failure on test-only commits
- oxfmtrc: ignore codemod test fixtures
- CONTRIBUTING: add Tests section and pnpm test to PR checklist
- publish workflow: run pnpm test before publishing
- lint workflow: add pnpm lint:publish to build step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c313fe2b-117c-445c-9ea9-85525939c688

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-test-suite

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 28, 2026

commit: 93902f9

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

📊 Package size report   0.2%↑

File Before After
package.json 2.4 kB 11%↑2.7 kB
Total (Includes all files) 155.6 kB 0.2%↑155.9 kB
Tarball size 31.3 kB 0.3%↑31.4 kB
Unchanged files
File Size
dist/index.d.mts 20.0 kB
dist/index.d.ts 20.0 kB
dist/index.js 33.1 kB
dist/index.mjs 31.5 kB
LICENSE.md 1.1 kB
README.md 47.5 kB

🤖 This report was automatically generated by pkg-size-action

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.

1 participant