Skip to content

test: refine reviewed enum test cases - #96

Merged
shijistar merged 2 commits into
masterfrom
test/refine-reviewed-test-cases
Jul 17, 2026
Merged

test: refine reviewed enum test cases#96
shijistar merged 2 commits into
masterfrom
test/refine-reviewed-test-cases

Conversation

@shijistar

@shijistar shijistar commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Background

This follow-up addresses the three medium-severity test issues deferred from the review of #95.

Changes

  • Clarify localization titles to describe fallback to the global localizer when an Enum-specific localizer is undefined.
  • Clarify that Enum instances respond to a global localizer assigned after creation.
  • Remove the explicit mode: 'text' setting from the default-mode test, verifying that the next-international plugin falls back to text mode.
  • Update the mixed native enum fixture to use A = 1, B = 'AAA', and C = 2, with matching assertions and an accurate behavior-oriented title.

Validation

  • npm test — 9 suites, 112 tests passed; 100% coverage
  • npm test --workspace @enum-plus/plugin-antd — 5 suites, 17 tests passed; 100% coverage
  • npm test --workspace @enum-plus/plugin-next-international — 1 suite, 12 tests passed; 100% coverage
  • Targeted ESLint — passed
  • Prettier check — passed
  • git diff --check — passed

Risk

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

  • Tests
    • Updated localization test descriptions to clarify fallback and delayed global-localizer behavior.
    • Improved coverage for mixed string and numeric enum values.
    • Verified English localization when no explicit mode is configured.

Copilot AI review requested due to automatic review settings July 17, 2026 12:43
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/refine-reviewed-test-cases

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.

❤️ Share

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-international default-mode test to omit an explicit mode: '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.

Comment thread test/test-suites/localization.ts Outdated
Comment thread test/test-suites/localization.ts Outdated
Comment thread packages/plugin-antd/test/test-suites/localization.ts Outdated
Comment thread packages/plugin-antd/test/test-suites/localization.ts Outdated
Comment thread test/test-suites/create-enum.ts Outdated
@shijistar
shijistar merged commit c4fc146 into master Jul 17, 2026
40 checks 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.

2 participants