test: refine reviewed enum test cases - #96
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR follows up on deferred items from #95 by refining test suite titles for clearer localization-precedence behavior, adjusting a plugin-next-international default-mode test to rely on fallback behavior, and updating a mixed native-enum fixture to better reflect observed behavior.
Changes:
- Updated localization test titles (root + Ant Design plugin) to describe fallback behavior and delayed global-localizer assignment.
- Updated
plugin-next-internationaldefault-mode test to omit an explicitmode: 'text'. - Updated the mixed native enum fixture and corresponding assertions/title in the enum creation suite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
test/test-suites/localization.ts |
Renames two localization-precedence test titles for clearer behavior descriptions. |
test/test-suites/create-enum.ts |
Updates mixed native-enum fixture values and expected items; updates test title accordingly. |
packages/plugin-next-international/test/test-suites/localization.tsx |
Removes explicit mode: 'text' from the default-mode test setup. |
packages/plugin-antd/test/test-suites/localization.ts |
Mirrors the root localization title refinements in the Ant Design plugin tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Background
This follow-up addresses the three medium-severity test issues deferred from the review of #95.
Changes
mode: 'text'setting from the default-mode test, verifying that the next-international plugin falls back to text mode.A = 1,B = 'AAA', andC = 2, with matching assertions and an accurate behavior-oriented title.Validation
npm test— 9 suites, 112 tests passed; 100% coveragenpm test --workspace @enum-plus/plugin-antd— 5 suites, 17 tests passed; 100% coveragenpm test --workspace @enum-plus/plugin-next-international— 1 suite, 12 tests passed; 100% coveragegit diff --check— passedRisk
Low. Changes are limited to test titles, one omitted default option, and one native enum test fixture with corresponding assertions. No production code is changed.
Summary by CodeRabbit