Reputation: 33
I've installed nodejs and jasmine-node and it runs in command line.
Configuration of WebStorm Runner:
jasmine-node --config endpoint ServerAddress:8083
G:\NPWorkDir\frisby
src\protocol\find_spec.js
"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
Upvotes: 3
Views: 974
Reputation: 1975
My answer uses linux instead of windows pathnames!
I would recommend jasmine instead of jasmine-node, it seems to be more actual. Create the configuration with
./node_modules/.bin/jasmine init
edit jasmine.json
if necessary.
I would create a npm script in package.json
as:
"scripts": {
"test": "node_modules/.bin/jasmine",
...
},
and define it in Webstorm as npm script; command: run, script: test
Upvotes: 0
Reputation: 33
Full configuration to run jsmine-node:
Install jasmine node with -save parameter:
npm install jasmine-node -save
Configuration WebStorm runner with this parameters:
Upvotes: 0
Reputation: 93728
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;
Upvotes: 3