Skip to content

Fixed lint warning in useForm test#28046

Merged
EvanHahn merged 2 commits into
mainfrom
fix-useform-test-lint-error
May 21, 2026
Merged

Fixed lint warning in useForm test#28046
EvanHahn merged 2 commits into
mainfrom
fix-useform-test-lint-error

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

no ref

This test-only change fixes a lint warning about beforeEach and afterEach being too high up.

@EvanHahn EvanHahn enabled auto-merge (squash) May 21, 2026 15:56
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ddac779f-817f-49aa-9533-e8b11d1f2169

📥 Commits

Reviewing files that changed from the base of the PR and between eedb013 and ae7ba27.

📒 Files selected for processing (1)
  • apps/admin-x-framework/test/unit/hooks/use-form.test.ts

Walkthrough

The test file moves its global test setup/teardown into the describe('useForm') block: beforeEach now calls useFakeTimers and sets up mocks inside that describe, and afterEach runs useRealTimers, clearAllMocks, and restoreAllMocks inside the same describe, scoping these operations to the useForm test suite.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a lint warning in the useForm test by moving hooks to proper scope.
Description check ✅ Passed The description is related to the changeset, explaining that the PR fixes a lint warning by moving beforeEach and afterEach hooks to a lower scope in the test file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-useform-test-lint-error

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 and usage tips.

@EvanHahn EvanHahn force-pushed the fix-useform-test-lint-error branch from eedb013 to ae7ba27 Compare May 21, 2026 16:17
@github-actions
Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 26238479364 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@EvanHahn EvanHahn merged commit c94fdab into main May 21, 2026
41 checks passed
@EvanHahn EvanHahn deleted the fix-useform-test-lint-error branch May 21, 2026 22:38
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