Running individual tests with JsTestDriverPlugin

I'm using the IntelliJ JSTestDriver plugin, and when I right click on a test file and select Run, it runs all of my tests. My JSTD plugin has a configuration line that looks like

- js-test/*.spec.js

Which is needed for running all of my tests from the command line. But intellij runs all of the tests even when selecting a single file to run.

Is there a way to just run an individual test using JsTestDriver in IntelliJ?


No, there isn't at the moment (even in the console).
It's Jasmine JsTestDriver adapter limitation. See the issue: .



Thanks. What is still a little confusing through from IntellIJ is that even though you can only run all of the tests, the IntelliJ config still lets you pick an individual file to run and creates a test case with that name. It is a bit misleading because it looks like you are actually running only the single test based on the config name. Maybe the "JavaScript test file" option shouldn't be there for JSTestDriver since it's not possible (and you can just use one of the options based on the JSTestDriver config file).



There are other assertion frameworks supported by JsTestDriver, not only Jasmine.
Just to be clear:
1) It's impossible to run an individual Jasmine suite/spec if you run it using JsTestDriver with .
2) It's possible to run an individual QUnit test/module if you run it using use JsTestDriver with .
3) It's possible to run an individual JsTestDriver testCase/testMethod ( if you run it using JsTestDriver.
So, yes, I agree that "JavaScript test file" doesn't make sense for Jasmine tests.


I agree with your assessment. Does this warrant a bug report for IntelliJ?


Done, issue IDEA-99340 (there were only Unit Testing subsystems for junit and testng, so I just put it under the junit one - I suspect this will need to be changed).


Please sign in to leave a comment.