Skip to content

Writing Tests

supahgreg edited this page · 3 revisions

There are two test suites used with Scriptish: QUnit and Mozmill. The QUnit tests are available at about:scriptish?test, which means they can be run by anyone that is capable of installing Scriptish and typing about:scriptish?test into their location bar. The Mozmill tests require one to install mozmill, clone the Scriptish repo, and then run the ./test.sh file within the repo.

So, clearly, the QUnit tests are easier to run; they also have the advantage of being shipped with Scriptish to users, allowing us to run the tests on a greater number of environments. This is why before writing a test you should ask yourself if the test can be shipped to users; if the answer is yes then write a QUnit test, otherwise write a Mozmill test.

QUnit tests

You can find the QUnit documentation here.

Write the tests in extension/content/test/.

Mozmill tests

You can find the Mozmill documentation here.

Write the tests in tests/mozmill-tests/tests/.

Something went wrong with that request. Please try again.