Difference between revisions of "Using Qunit for testing JS"

From Dreamwidth Notes
Jump to: navigation, search
(DW::Controller::Dev)
(updated links to git)
Line 1: Line 1:
You can use [http://docs.jquery.com/Qunit Qunit] and [http://sinonjs.org/qunit/ Sinon] for automated testing of your JS front-end code using jQuery and jQuery UI (the JS libraries we use for new UI development). There are some sample tests in [http://hg.dwscoalition.org/dw-free/file/tip/views/dev/tests/ the views/dev/test/ directory]. The Qunit and Sinon code itself lives in [http://hg.dwscoalition.org/dw-free/file/tip/htdocs/js/tests/ the htdocs/js/tests/ directory]. There's some additional Dreamwidth-specific glue in [http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/DW/Controller/Dev.pm DW::Controller::Dev].
+
You can use [http://docs.jquery.com/Qunit Qunit] and [http://sinonjs.org/qunit/ Sinon] for automated testing of your JS front-end code using jQuery and jQuery UI (the JS libraries we use for new UI development). There are some sample tests in [https://github.com/dreamwidth/dw-free/blob/develop/views/dev/tests/ the views/dev/test/ directory]. The Qunit and Sinon code itself lives in [https://github.com/dreamwidth/dw-free/blob/develop/htdocs/js/tests/ the htdocs/js/tests/ directory]. There's some additional Dreamwidth-specific glue in [https://github.com/dreamwidth/dw-free/blob/develop/cgi-bin/DW/Controller/Dev.pm DW::Controller::Dev].
  
 
For automated testing of back-end components, see [[Dev Testing]].
 
For automated testing of back-end components, see [[Dev Testing]].

Revision as of 03:43, 21 August 2012

You can use Qunit and Sinon for automated testing of your JS front-end code using jQuery and jQuery UI (the JS libraries we use for new UI development). There are some sample tests in the views/dev/test/ directory. The Qunit and Sinon code itself lives in the htdocs/js/tests/ directory. There's some additional Dreamwidth-specific glue in DW::Controller::Dev.

For automated testing of back-end components, see Dev Testing.

This page needs to be updated with whatever happens as a result of bug 3525.

This article could really use expansion. If you have information to add, please edit this page!