diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/basic.js | 35 | ||||
| -rw-r--r-- | test/browser.html | 20 |
2 files changed, 55 insertions, 0 deletions
diff --git a/test/basic.js b/test/basic.js new file mode 100644 index 0000000..90aadd6 --- /dev/null +++ b/test/basic.js @@ -0,0 +1,35 @@ +if (typeof require === "function") { + require("cobalt-log"); +} + +var co = new Cobalt.Console({ + loggers : [ + new Cobalt.Logger.JsConsole({ + formatter : Cobalt.Formatter.Token, + formatterOpts : { + formatString : "[{{_level}}] {{message}} {{customParam}}" + } + }) + ] +}) + +// TODO: Do this whole thing with tellurium. + +co.log("Log - Normal"); +co.debug("Warn - Normal"); +co.info("Info - Normal"); +co.notice("Notice - Normal"); +co.warn("Warn - Normal"); +co.error("Error - Normal"); + +var logObject = co.extendLog({ + message : "Extended Log Object", + customParam : "<3" +}); + +co.log(logObject); +co.debug(logObject); +co.info(logObject); +co.notice(logObject); +co.warn(logObject); +co.error(logObject); diff --git a/test/browser.html b/test/browser.html new file mode 100644 index 0000000..ec58b6f --- /dev/null +++ b/test/browser.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <title>Tellurium Test Runner</title> + + <!-- load neon dependency. These are node modules, I'm not sure this is a good way to load it --> + <script src="../node_modules/neon/neon.js" type="text/javascript" charset="utf-8"></script> + + <!-- include cobalt --> + <script src="../node_modules/cobalt-log/lib/cobalt.js" type="text/javascript" charset="utf-8"></script> + <script src="../node_modules/cobalt-log/lib/loggers/console.js" type="text/javascript" charset="utf-8"></script> + <script src="../node_modules/cobalt-log/lib/formatters/token.js" type="text/javascript" charset="utf-8"></script> + + <!-- include test files here... --> + <script type="text/javascript" src="basic.js"></script> + + </head> + <body> + </body> +</html> |