commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / bower_components / qunit / README.md
CommitLineData
7f254ad8
AE
1[QUnit](http://qunitjs.com) - A JavaScript Unit Testing framework.
2================================
3
4QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery
5project to test its code and plugins but is capable of testing any generic
6JavaScript code (and even capable of testing JavaScript code on the server-side).
7
8QUnit is especially useful for regression testing: Whenever a bug is reported,
9write a test that asserts the existence of that particular bug. Then fix it and
10commit both. Every time you work on the code again, run the tests. If the bug
11comes up again - a regression - you'll spot it immediately and know how to fix
12it, because you know what code you just changed.
13
14Having good unit test coverage makes safe refactoring easy and cheap. You can
15run the tests after each small refactoring step and always know what change
16broke something.
17
18QUnit is similar to other unit testing frameworks like JUnit, but makes use of
19the features JavaScript provides and helps with testing code in the browser, e.g.
20with its stop/start facilities for testing asynchronous code.
21
22If you are interested in helping developing QUnit, you are in the right place.
23For related discussions, visit the
24[QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing).
25
26Planning for a qunitjs.com site and other testing tools related work now happens
27on the [jQuery Testing Team planning wiki](http://jquerytesting.pbworks.com/w/page/41556026/FrontPage).
28
29Development
30-----------
31
32To submit patches, fork the repository, create a branch for the change. Then implement
33the change, run `grunt` to lint and test it, then commit, push and create a pull request.
34
35Include some background for the change in the commit message and `Fixes #nnn`, referring
36to the issue number you're addressing.
37
38To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`. That gives you a global
39grunt binary. For additional grunt tasks, also run `npm install`.
40
41Releases
42--------
43
44Install git-extras and run `git changelog` to update History.md.
45Update qunit/qunit.js|css and package.json to the release version, commit and
46tag, update them again to the next version, commit and push commits and tags
47(`git push --tags origin master`).
48
49Put the 'v' in front of the tag, e.g. `v1.8.0`. Clean up the changelog, removing merge commits
50or whitespace cleanups.
51
52To upload to code.jquery.com (replace $version accordingly):
53
54 scp -q qunit/qunit.js jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.js
55 scp -q qunit/qunit.css jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.css
56
57Then update /var/www/html/code.jquery.com/index.html and purge it with:
58
59 curl -s http://code.origin.jquery.com/?reload