Confirmed users
324
edits
m (→Test Runners) |
mNo edit summary |
||
| Line 14: | Line 14: | ||
=== Test Runners === | === Test Runners === | ||
==== [http://docs.jquery.com/Qunit QUnit] ==== | |||
* Pros | |||
** popular framework, well supported | |||
** very simple and easy to write tests with | |||
** Runs primarily in a web browser like production | |||
** Can provide visual feedback if necessary (useful for development) | |||
** uses a real DOM | |||
** since tests are written in HTML, Zamboni template logic can be reused in some cases | |||
** has several adapters for the command line | |||
*** [https://github.com/kof/node-qunit/ QUnit in node.js] | |||
*** QUnit with Rhino + [https://github.com/thatcher/env-js env.js] (example in [http://pypi.python.org/pypi/NoseJS#running-javascript-tests NoseJS] and [https://github.com/eroh92/nosejs this fork]) | |||
*** [http://code.google.com/p/js-test-driver/wiki/QUnitAdapter Qunit for JsTestDriver] (Cannot do async testing) | |||
* Cons | |||
** Might be tricky to get working for CI. Could load a single webpage in a web browser VM though and use builtin hooks to get test results | |||
** All user events need to be simulated by triggering the event or otherwise. | |||
** does not fit seamlessly into the current test suite (but maybe with NoseJS?) | |||
=== Mock Objects === | === Mock Objects === | ||