Search code examples
node.jsunit-testingangularjsjasminejasmine-node

Including Jasmine-node files in Karma's runner


Currently I have a set of node.js Javascript files along side a set of "regular" Javascript files that I will send down to a browser, using Angular as the client side framework. For unit testing I am using jasmine-node to test the server and am using jasmine via Karma for my client side files. Is there a way I can include my jasmine-node files into Karma to have a single test runner?


Solution

  • I also have a node.js server with angular.js client code and am using jasmine-node. I do not know if there is a way (or if it is even desirable) to use jasmine-node to test your client code. I am using karma (which is formerly testacular) and it works beautifully. All you need to do is create a config file that loads your project and angular.mock.js and points to your test files.

    I'm sorry this doesn't exactly answer your question but it is a painless testing method.

    http://karma-runner.github.com/0.8/index.html