I am currently working on some test cases for my website. I’ve managed to test the back-end functionality using the simple-test framework.
I have some important javascript tools that requires some automatic testing. I know javascript is a client side language and it requires a browser, i am just wondering if its something i can do.
Notice the test must run from Linux CLI.
Thank you
You can install node.js with jasmine-node package to run your tests using cli:
Here’s a brief intro to Jasmine:
http://net.tutsplus.com/tutorials/javascript-ajax/testing-your-javascript-with-jasmine/
And here’s a tutorial on jasmine-node:
http://www.2ality.com/2011/10/jasmine.html
PS
In order to reference the code to be tested is useful to grasp how
module.exportworks on Node.js … here you’ll find all the info you need to get started:http://jherdman.github.com/2010-04-05/understanding-nodejs-require.html(broken link) http://coppieters.blogspot.be/2013/03/tutorial-explaining-module-export.html