Is there a way to start JavaScript unit-tests in PHPStrorm

Hello, dear gurus. Do exists way to make JavaScript unit-tests in PHPStrorm work? I try to launch unit-tests by using JSTestDriver. Follow instruction in manual but it gives result not as written. Also it's written that JSTestDriver is outdated and it seems JSTestDriver is really unsupported. other test runners require node.js i start installation this way requires a lot of time to setup. Is there some short way to setup some unit tests?

3 comments
Comment actions Permalink

Sure you can - just in the same way as in WebStorm.
JSTestDriver itself is indeed outdated, but still can be used. But you need to install JSTestDriver plugin from settings/Plugins, Install JetBrains plugin..., to enable the integration. Have you done this already? If yes, what problems using it have you faced?

0
Comment actions Permalink

I installed JSTestDriver, in manual it's written that after opened jasmine project. that phpstorm automatically add dependies in library, but nothing works. I added jasmine library manually but still phpstorm doesn't recognize regular constructions in unit-tests. i saw video in jetbrains review but it shows only launched tests. but doesn't described how to setup unit-testing

0
Comment actions Permalink

Are your tests written using Jasmine? You need adding Jasmine JSTestDriver adapter to your project and setting it up in your configuration file to get tests working. We used to have special inspections that added needed libraries to the project. But they are currently missing (https://youtrack.jetbrains.com/issue/WEB-17955).
I'm attaching the sample project with needed libraries and proper configuration file - see if it works for you



Attachment(s):
jasmineJSTD.zip
0

Please sign in to leave a comment.