- By Robert Firek
- Posted 17 Mar 2015
So, why we do we hate it so much?
I’ve got a framework
I’ve got a test
The source code cannot exist without tests. QUnit, Jasmine or Mocha are unit test frameworks that can help you to test your code. Unit test libraries already provide basic assertions, but you can extend this functionality by using chai or should.js libraries. If you want to use mocks, stubs and spies in your code, there are libraries for that too (e.g. sinon).
Node.js is the best choice if you need some environment to run tests. Karma or Testem give us possibility to verify behaviours in web browsers. Tests can be also executed as part of a Continuous Integration pipeline using a headless browser (PhantomJS).
I’ve got a choice