aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2014-03-20 10:27:45 -0600
committerBen Beltran <ben@freshout.us>2014-03-20 10:27:45 -0600
commita181aeae67a9c9c86e9df92ab5c0de6ce00f47fb (patch)
tree14573b00ea3b9538b5875d5745b1f89d5d2a32d5 /test
parent26b061b8b81f39ad11fbd9c6c761ec3e699dbad2 (diff)
Cobalt 2.0 -> Now with neon 2.0
Diffstat (limited to 'test')
-rw-r--r--test/basic.js35
-rw-r--r--test/browser.html20
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>