4 var fixture = document.getElementById("qunit-fixture");
7 QUnit.module('loglevel', {
10 teardown: function() {
15 test('basic test', function() {
20 // Check that noConflict restored the original log
21 ok(typeof log === "function", "log is a function");
22 ok(log === QUnit.log, "log is Qunit.log");
24 // Check that noConflict setup logging
25 ok(typeof logging !== "undefined", "logging is defined");
26 ok(typeof logging === "object", "logging is an object");
27 ok(typeof logging.trace === "function", "trace is a function");
28 ok(typeof logging.debug === "function", "debug is a function");
29 ok(typeof logging.info === "function", "info is a function");
30 ok(typeof logging.warn === "function", "warn is a function");
31 ok(typeof logging.error === "function", "error is a function");
32 ok(typeof logging.setLevel === "function", "setLevel is a function");
33 ok(typeof logging.setDefaultLevel === "function", "setDefaultLevel is a function");
34 ok(typeof logging.enableAll === "function", "enableAll is a function");
35 ok(typeof logging.disableAll === "function", "disableAll is a function");
36 ok(typeof logging.getLogger === "function", "getLogger is a function");
38 // Use the API to make sure it doesn't blantantly fail with exceptions
39 logging.trace("a trace message");
40 logging.debug("a debug message");
41 logging.info("an info message");
42 logging.warn("a warn message");
43 logging.error("an error message");
45 var newLogger = logging.getLogger("newLogger");
46 newLogger.trace("a trace message");
47 newLogger.debug("a debug message");
48 newLogger.info("an info message");
49 newLogger.warn("a warn message");
50 newLogger.error("an error message");