X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/f34953cad258ff91e1ce024309478c8c50882a87..ac01c25abcbe7d2ede91723ac91d519bd170fd1f:/js/t/example.js diff --git a/js/t/example.js b/js/t/example.js new file mode 100644 index 000000000..fbe8df91a --- /dev/null +++ b/js/t/example.js @@ -0,0 +1,21 @@ +// See http://api.qunitjs.com/ for documentation of available methods +// (especially the »asserts«). + +// Run these tests in your browser by opening the URL +// …/controller.pl?action=JSTests/run + +QUnit.test("example tests", function( assert ) { + // Simple true/false tests: + assert.ok(1 == "1", "Integer 1 equals string 1"); + + // Comparing objects: + var actual = { chunky: "bacon" }; + var expected = { chunky: "bacon" }; + assert.deepEqual(actual, expected, "Objects can have equal value"); + + // Test if an exception is thrown: + assert.throws(function() { throw "Boom!"; }); + + // If you want to see how something fails uncomment this: + // assert.deepEqual({ we: "are not" }, { in: "Kansas anymore" }); +});