webstormjasmine-node

How to run jasmine-node in WebStorm IDE


I've installed nodejs and jasmine-node and it runs in command line.

Configuration of WebStorm Runner:

  1. Node parameters: jasmine-node --config endpoint ServerAddress:8083
  2. Working directory: G:\NPWorkDir\frisby
  3. JavaScript file: src\protocol\find_spec.js

WebStorm Terminal:

"C:\Program Files\JetBrains\WebStorm\bin\runnerw.exe" "G:\Program 
Files\nodejs\node.exe" jasmine-node --config endpoint ServerAddress:8083 
G:\NPWorkDir\frisby\src\
protocol\find_spec.js

module.js:471
throw err;
^

Error: Cannot find module 'G:\NPWorkDir\tester-frisbys\jasmine-node'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Process finished with exit code 1

Solution

  • you have to specify node_modules\jasmine-node\bin\jasmine-node as a JavaScript file, passing --config option and you .js file as Application parameters, like;

    enter image description here