Extension:MobileFrontend/Writing QUnit tests

Setting up your test environment
Put this in LocalSettings.php

Now try running the existing tests. Caveat: Depending on whether you are in mobile mode or desktop mode different tests will run!
 * 1) On the command line simply by running `make qunit`
 * 2) Visit Special:JavaScriptTest/QUnit in the mobile skin or desktop skin.

If they are green great let's write a new test!

Adding your test file
In mobile to add a test navigate to the tests/qunit folder All files here are laid out as they are in the javascripts folder and have the same filename only prefixed with test_

e.g. A file in javascripts/common called Xyz.js will have a corresponding test in tests/qunit/common/test_Xyz.js

Add the following code into your new test file:

Now run the test. It should fail. If so yeyy.

Writing your test
QUnit is pretty basic once you get the hang of it. Manual:JavaScript_unit_testing/QUnit_guidelines is a good jumping off point.