Show Jest Runner option inside Run gutter icon for Bazel based project
Hi there,
For some reason the Jest Run option is not available for me when I press Green Run gutter icon. Only Mocha runner is available.

A bit about project setup. I have Bazel project. All of my frontend code lives in a sub-folder that has package.json. I've already read that the runner options are determined by the content of package.json. In my case it contains both "jest" and "mocha" dependencies. If I delete "mocha" from it then Run icon shows "Nothing here" message.
What I've found so far: I noticed that "JestRunConfigurationProducer" marked as Ignored Producer in my ".idea/runConfigurations.xml" file. Jest runner option becomes available when I delete "JestRunConfigurationProducer" from this list. But this changes does not persist after IDEA restart.
.idea/runConfigurations.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
... other options
<option value="com.intellij.javascript.jest.JestRunConfigurationProducer" />
</set>
</option>
</component>
</project>
I suspect that "JestRunConfigurationProducer" is added to this list because it's Bazel based project. I'm not sure whether it's relevant but here in bazelbuild/intellij GitHub repo the "JestRunConfigurationProducer" is explicitly marked as ignored. Maybe that is why it appears in .idea/runConfigurations.xml file.
Also, the Jest Run option becomes available when I create IntelliJ Javascript project just based on the sub-folder that contains my frontend code. When I change the dependencies in package.json the IDEA correctly reflects that in the Run option dialog.

I tried it with 2022.1.1, 2021.3.3 versions. There is also no errors in the IDEA logs.
Any ideas how I can fix it? Thanks!
请先登录再写评论。
Yes, Bazel plugin must be a culprit. Please try disabling it and re-starting the IDE - does the issue persist?
no, with disabled Bazel plugin the Jest option is available. Maybe there is some workaround I can use to get Jest option right now?
No, except for creating the run configurations manually instead of using the gutter icons:(
I'd suggest reporting the issue to https://github.com/bazelbuild/intellij/issues
I see, thanks for the help!
I've created the issue on `bazelbuild/intellij` GItHub project.
Thank you!