Wednesday, November 12, 2014

Javascript - Unit Testing (with Jasmine) using NodeJS

Here's how to implement unit testing (with Jasmine and Node) for a class defined earlier:


Source files in subfolder "src" and test files in subfolder "spec". All test files must end with ".spec.js". Execute the test like so:


Done.

To run tests via a browser instead, see this other post.

No comments:

Post a Comment