Skip to content

Tests that need the JavaScript plugin never run: give them a test task with the plugin enabled #2007

Closed

Description

@lagergren

Problem

Tests that need IntelliJ's JavaScript plugin never run, neither in CI nor locally:

  • CI's default test legs run IntelliJ IDEA Community, which has no JavaScript plugin.

  • On IntelliJ IDEA Ultimate and the unified IntelliJ IDEA (CI's 2026.3 leg), build.gradle.kts disables the JavaScript and CSS plugins in the test sandbox for every test, since ci: test on IntelliJ 2025.3 and 2026.3 too, on Linux #1931:

    prepareTestSandbox {
        disabledPlugins.addAll("JavaScript", "com.intellij.css")
    }

    They would otherwise take over the .js, .ts and .css files that other tests give to LSP4IJ.

So DAPExpressionCodeFragmentJavaScriptTest, added by #2001 for #1998, returns at its first line in every run (Language.findLanguageByID("JavaScript") == null) and passes without testing anything. Its comment says it runs with platformType=IU and the bundled JavaScript plugin; while the sandbox disables the plugin, it doesn't.

What a run with the plugin shows

Before #2001 was merged, I ran it locally with that disabledPlugins line commented out, on IntelliJ IDEA Ultimate 2024.2 with the bundled JavaScript plugin, together with a broader check of 15 Evaluate-style expressions:

main before #2001 #2001
ClassCastException of #1998 when resolving the references of 7 of the 15 expressions, and in the highlighting passes for 2 of them none
The fragment DAPExpressionCodeFragment JSFileImpl
DAPExpressionCodeFragmentJavaScriptTest passes

So the test does catch #1998 when the plugin is there. #1763 made the fragments physical, which made #1998 frequent.

Suggestion

Give the tests that need the JavaScript plugin a test task of their own, with a sandbox in which JavaScript and CSS stay enabled, for example through the IntelliJ Platform Gradle Plugin's custom testing tasks (intellijPlatformTesting). Then:

  • run only those tests in it, by a naming convention or a JUnit tag, and leave them out of test;
  • run it in CI on a leg whose IDE bundles the JavaScript plugin, such as 2026.3;
  • make such a test fail, not return, when the plugin is missing, so that a sandbox without it shows up as a failure.

Related: #1998, #2001, #1931, #1763.

Activity

  1. modified the milestones: 0.31.0, 0.30.0 on Nov 17, 2026
  2. added a commit that references this issue on Nov 18, 2026
    6348fff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions