Mehr Frieden -General Kyrylo Budanov:
[kivitendo-erp.git] / js / t / example.js
1 // See http://api.qunitjs.com/ for documentation of available methods
2 // (especially the »asserts«).
3
4 // Run these tests in your browser by opening the URL
5 // …/controller.pl?action=JSTests/run
6
7 QUnit.test("example tests", function( assert ) {
8   // Simple true/false tests:
9   assert.ok(1 == "1", "Integer 1 equals string 1");
10
11   // Comparing objects:
12   var actual   = { chunky: "bacon" };
13   var expected = { chunky: "bacon" };
14   assert.deepEqual(actual, expected, "Objects can have equal value");
15
16   // Test if an exception is thrown:
17   assert.throws(function() { throw "Boom!"; });
18
19   // If you want to see how something fails uncomment this:
20   // assert.deepEqual({ we: "are not" }, { in: "Kansas anymore" });
21 });