Previously, I used the npm package node jasmine-node. However, the documentation says it only supports Jasmine 1.3.1.
I'd like to run Jasmine 2.0 tests on a Node project.
I found jasmine-core, which looks like it contains the Jasmine 2.0 libraries, but not the command line runner.
What do I need to do to make this work?
In order to test a Node. js application, the jasmine framework needs to be installed first. This is done by using the Node package manager. The test code needs to be written in a separate file, and the word 'spec' should be appended to the file name.
We can install Jasmine for node. js by running npm install jasmine-node -g . We provide the -g option to install it globally, so we're able to run jasmine-node from the command line.
Late response you may know the answer at this point but, try the jasmine-node module 2.0 beta4
Install it via following command
sudo npm install -g [email protected]
Cheers!
It's now installed without the -beta4 part of the version number
sudo npm install -g [email protected]
There is now a https://github.com/jasmine/jasmine-npm
It lacks several of the bells and whistles that jasmine-node
has, but
jasmine-node
uses jasmime 2.0 as of February 2015, while jasmine-npm
uses jasmine 2.2).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With