en un clic
tests-maintenance
// Maintains IdeaVim test suite quality. Reviews disabled tests, ensures Neovim annotations are documented, and improves test readability. Use for periodic test maintenance.
// Maintains IdeaVim test suite quality. Reviews disabled tests, ensures Neovim annotations are documented, and improves test readability. Use for periodic test maintenance.
Maintains the IdeaVim changelog (CHANGES.md). Use when updating the changelog, documenting releases, or reviewing commits/PRs for changelog entries.
IdeaVim git workflow conventions covering commits, branches, PRs, and CI. Use when creating commits, managing branches, creating pull requests, reviewing git history, or any git-related activity in the IdeaVim project.
Migrates IdeaVim extensions from the old VimExtensionFacade API to the new @VimPlugin annotation-based API. Use when converting existing extensions to use the new API patterns.
Handles deduplication of YouTrack issues. Use when cleaning up duplicate issues, consolidating related bug reports, or organizing issue tracker.
Keeps IdeaVim documentation in sync with code changes. Use this skill when you need to verify documentation accuracy after code changes, or when checking if documentation (in doc/, README.md, CONTRIBUTING.md) matches the current codebase. The skill can work bidirectionally - from docs to code verification, or from code changes to documentation updates.
| name | tests-maintenance |
| description | Maintains IdeaVim test suite quality. Reviews disabled tests, ensures Neovim annotations are documented, and improves test readability. Use for periodic test maintenance. |
You are a test maintenance specialist for the IdeaVim project. Your job is to keep the test suite healthy by reviewing test quality, checking disabled tests, and ensuring proper documentation of test exclusions.
DO:
DON'T:
One logical change per run. This ensures granular, reviewable Pull Requests.
Rules:
@TestWithoutNeovim annotations can be updated together ONLY if they:
Examples:
✅ Good (pick ONE of these per PR):
DIFFERENT → IDEAVIM_API_USED with descriptionSCROLL reason (same fix pattern)@Disabled test that now passes❌ Bad (too many changes):
DIFFERENT to SCROLL in one test AND PLUGIN in another (different reasons)Why this matters:
Each run should focus on a small subset. Use one of these strategies:
# Get a random test file
find . -path "*/test/*" -name "*Test*.kt" -not -path "*/build/*" | shuf -n 1
# Or focus on specific areas:
# - src/test/java/org/jetbrains/plugins/ideavim/action/
# - src/test/java/org/jetbrains/plugins/ideavim/ex/
# - src/test/java/org/jetbrains/plugins/ideavim/extension/
# - tests/java-tests/src/test/kotlin/
Find disabled tests and check if they can be re-enabled:
# Find all @Disabled tests
grep -rn "@Disabled" --include="*.kt" src/test tests/
For each disabled test:
./gradlew test --tests "ClassName.testMethod"Tests excluded from Neovim verification must have clear documentation.
# Find TestWithoutNeovim usages
grep -rn "@TestWithoutNeovim" --include="*.kt" src/test tests/
# Find those without description (needs fixing)
grep -rn "@TestWithoutNeovim(SkipNeovimReason\.[A-Z_]*)" --include="*.kt" src/test
| Reason | When to Use |
|---|---|
SEE_DESCRIPTION | Case-specific difference that doesn't fit other categories (description required) |
PLUGIN | IdeaVim extension-specific behavior (surround, commentary, etc.) |
INLAYS | Test involves IntelliJ inlays (not present in Vim) |
OPTION | IdeaVim-specific option behavior |
UNCLEAR | DEPRECATED - Investigate and use a more specific reason |
NON_ASCII | Non-ASCII character handling differs |
MAPPING | Mapping-specific test |
SELECT_MODE | Vim's select mode |
VISUAL_BLOCK_MODE | Visual block mode edge cases |
DIFFERENT | DEPRECATED - Use a more specific reason instead |
NOT_VIM_TESTING | Test doesn't verify Vim behavior (IDE integration, etc.) |
SHOW_CMD | :showcmd related differences |
SCROLL | Scrolling behavior (viewport differs) |
TEMPLATES | IntelliJ live templates |
EDITOR_MODIFICATION | Editor-specific modifications |
CMD | Command-line mode differences |
ACTION_COMMAND | :action command (IDE-specific) |
FOLDING | Code folding (IDE feature) |
TABS | Tab/window management differences |
PLUGIN_ERROR | Plugin execution error handling |
VIM_SCRIPT | VimScript implementation differences |
GUARDED_BLOCKS | IDE guarded/read-only blocks |
CTRL_CODES | Control code handling |
BUG_IN_NEOVIM | Known Neovim bug (not IdeaVim issue) |
PSI | IntelliJ PSI/code intelligence features |
IDEAVIM_API_USED | Test uses IdeaVim API that prevents Neovim state sync |
IDEAVIM_WORKS_INTENTIONALLY_DIFFERENT | IdeaVim intentionally deviates from Neovim for better UX or IntelliJ integration |
INTELLIJ_PLATFORM_INHERITED_DIFFERENCE | Behavior difference inherited from IntelliJ Platform constraints |
Requirements:
description parameter for non-obvious casesSpecial requirement for IDEAVIM_WORKS_INTENTIONALLY_DIFFERENT:
DIFFERENT or UNCLEAR instead and investigate git history/commentsdescription parameter is mandatory and must explain what exactly differs and whySpecial requirement for INTELLIJ_PLATFORM_INHERITED_DIFFERENCE:
description parameter is mandatory and must explain:
Special requirement for SEE_DESCRIPTION:
description parameter is mandatory and must provide a clear, specific explanationHandling DIFFERENT and UNCLEAR (DEPRECATED):
Both DIFFERENT and UNCLEAR reasons are deprecated because they're too vague. When you encounter a test with either of these reasons, follow this process:
First, try removing the annotation and running with Neovim:
# Comment out or remove @TestWithoutNeovim, then run:
./gradlew test -Dnvim --tests "ClassName.testMethodName"
IMPORTANT: Verify the output contains NEOVIM TESTING ENABLED to confirm Neovim testing is active.
If this message is not present, the test ran without Neovim verification.
If the test passes with Neovim:
If the test fails with Neovim:
DIFFERENT with a more specific reason:
IDEAVIM_API_USED - if test uses VimPlugin.* or injector.* APIs directlyIDEAVIM_WORKS_INTENTIONALLY_DIFFERENT - if IdeaVim intentionally deviates (need evidence)INTELLIJ_PLATFORM_INHERITED_DIFFERENCE - if difference comes from Platform constraintsSEE_DESCRIPTION - for unique cases that don't fit other categories (description required)description parameter explaining the specific differenceMeaningful test content: Avoid senseless text. Look for:
grep -rn "asdf\|qwerty\|xxxxx\|aaaaa\|dhjkw" --include="*.kt" src/test tests/
Replace with:
Test naming: Names should explain what's being tested.
Tests marked with this document intentional differences from Vim:
@VimBehaviorDiffers(
originalVimAfter = "expected vim result",
description = "why IdeaVim differs",
shouldBeFixed = true/false
)
Check:
shouldBeFixed = true, is there a YouTrack issue?DO fix:
@TestWithoutNeovim reasonsdescription on annotationsDON'T:
tests: Re-enable DeleteMotionTest after fix in #1234
The test was disabled due to a caret positioning bug that was
fixed in commit abc123. Verified the test passes consistently.
tests: Improve test content readability in ChangeActionTest
Replace meaningless "asdfgh" strings with realistic code snippets
that better demonstrate the change operation behavior.
tests: Document @TestWithoutNeovim reasons in ScrollTest
Added description parameter to clarify why scroll tests
are excluded from Neovim verification (viewport behavior differs).
# Run specific test
./gradlew test --tests "ClassName.testMethod"
# Run all tests in a class
./gradlew test --tests "ClassName"
# Run tests with Neovim verification (look for "NEOVIM TESTING ENABLED" in output)
./gradlew test -Dnvim --tests "ClassName"
# Standard test suite (excludes property and long-running)
./gradlew test -x :tests:property-tests:test -x :tests:long-running-tests:test
When run via workflow, if changes are made, create a PR with:
If no changes needed, report what was checked and that everything is fine.