Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Warning: The JUM module has been dropped in Mozmill 2.0. Please make use of the assertions API instead.

The JUM API is basically a group of assertion methods to allow you to throw customized errors during testing.  It is intended to be used for unit testing in JavaScript.  To use the JUM API, you need to include jum.js in each test file.  You can do this similarly to how you include the Mozmill API:

var jumlib = {}; 
Components.utils.import("resource://mozmill/modules/jum.js", jumlib);

With this in place, you can simply call any of the methods we will talk about here using jumlib.method();  It should be noted that using these asserts will "silently" fail; that is, they will not break from the function like the asserts of the Controller API.

Methods

jumlib.assert(boolean, comment)

jumlib.assertTrue(boolean, comment)

jumlib.assertFalse(boolean, comment)

jumlib.assertEquals(value1, value2, comment)

jumlib.assertNotEquals(value1, value2, comment)

jumlib.assertNull(value, comment)

jumlib.assertNotNull(value, comment)

jumlib.assertUndefined(value, comment)

jumlib.assertNotUndefined(value, comment)

jumlib.assertNaN(value, comment)

jumlib.assertNotNaN(value, comment)

jumlib.fail()

jumlib.pass()