aboutsummaryrefslogtreecommitdiff
path: root/doc/COVERAGE.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/COVERAGE.md')
-rw-r--r--doc/COVERAGE.md272
1 files changed, 272 insertions, 0 deletions
diff --git a/doc/COVERAGE.md b/doc/COVERAGE.md
new file mode 100644
index 0000000..8127492
--- /dev/null
+++ b/doc/COVERAGE.md
@@ -0,0 +1,272 @@
+# TOC
+ - [test/cologne.js](#testcolognejs)
+ - [test/utilities.js](#testutilitiesjs)
+ - [test/formatters/simple.js](#testformatterssimplejs)
+ - [test/formatters/token.js](#testformatterstokenjs)
+ - [test/loggers/file.js](#testloggersfilejs)
+ - [test/loggers/console.js](#testloggersconsolejs)
+
+
+<a name="testcolognejs"></a>
+# test/cologne.js
+#log() should send every argument to the loggers.
+
+
+#log() should send the same arguments to all the loggers.
+
+
+#log() should send all objects in cologne log format.
+
+
+#log() should default to level 6.
+
+
+#debug() should set to level 7.
+
+
+#info() should set to level 6.
+
+
+#notice() should set to level 5.
+
+
+#warn() should set to level 4.
+
+
+#error() should set to level 3.
+
+
+#buildLog() should return a cologne log.
+
+
+#buildLog() should default to level 6.
+
+
+#buildLog() should use the specified level.
+
+
+#buildLog() should use the message property as the message if available.
+
+
+#buildLog() should extend the object with its properties.
+
+
+#log() calls using a pre-built cologne log should maintain the log level.
+
+
+#removeLogger() should do nothing if it can't find a logger.
+
+
+#removeLogger() should remove a logger.
+
+
+#removeLogger() should no longer affect removed logs.
+
+
+#addLogger() should add loggers after instance is live.
+
+
+
+ok - test/cologne.js
+<a name="testutilitiesjs"></a>
+# test/utilities.js
+::now() should give a precise bigint timestamp.
+
+
+::stringify() should behave like JSON.stringify for non-circular objects.
+
+
+::stringify() should replace circular references with a string.
+
+
+::stringify() should convert bigint to string.
+
+
+::getAnsiCode is sending the correct reset code.
+
+
+::getAnsiCode() should give us a reset code if something weird is sent.
+
+
+::getAnsiCode() should not have duplicated non-reset codes.
+
+
+::getAnsiCode() should not return a reset code in any other supported code.
+
+
+::gettLevelAnsi is red for emerg.
+
+
+::gettLevelAnsi is red for alert.
+
+
+::gettLevelAnsi is red for crit.
+
+
+::gettLevelAnsi is red for error.
+
+
+::gettLevelAnsi is yellow for warn.
+
+
+::gettLevelAnsi is blue for notice.
+
+
+::gettLevelAnsi is blue for info.
+
+
+::gettLevelAnsi is green for debug.
+
+
+::gettLevelAnsi is default for other values.
+
+
+
+ok - test/utilities.js
+<a name="testformatterssimplejs"></a>
+# test/formatters/simple.js
+#format() should output a string in plain mode.
+
+
+#format() should include the from property in plain mode.
+
+
+#format() should include the timestamp property in iso format in plain mode.
+
+
+#format() should include the level string property in plain mode.
+
+
+#format() should include the message property in plain mode.
+
+
+#format() should output a string in color mode.
+
+
+#format() should include the from property in color mode.
+
+
+#format() should include the timestamp property in iso format in color mode.
+
+
+#format() should include the level string property in color mode.
+
+
+#format() should include the message property in color mode.
+
+
+#format() should colorize the string.
+
+
+#format() should colorize only a bit of the string.
+
+
+
+ok - test/formatters/simple.js
+<a name="testformatterstokenjs"></a>
+# test/formatters/token.js
+#format() should output a string in default mode.
+
+
+#format() should include the message in default mode.
+
+
+#format() should output a string in custom mode.
+
+
+#format() with custom string should include the specified tokens (check 1).
+
+
+#format() with custom string should include the specified tokens (check 2).
+
+
+#format() with iso date should include the timestamp as an iso date.
+
+
+#format() should not replace tokens that don't match.
+
+
+#format() should output a string in ansi mode.
+
+
+#format() with ansi tokens should colorize the string.
+
+
+#format() with ansi reset should reset the string.
+
+
+#format() with ansi tokens should colorize the string based on level.
+
+
+#format() should output a string in plain date mode.
+
+
+#format() with plain date should include the timestamp as-is.
+
+
+#format() should output a string in custom search mode.
+
+
+#format() with a custom search, should properly match the new tokens.
+
+
+
+ok - test/formatters/token.js
+<a name="testloggersfilejs"></a>
+# test/loggers/file.js
+raw file.
+
+
+formatted file.
+
+
+it should send all params to the file.
+
+
+it should log the raw json object.
+
+
+it should send all params to the file.
+
+
+it should log the formatted object.
+
+
+
+ok - test/loggers/file.js
+<a name="testloggersconsolejs"></a>
+# test/loggers/console.js
+It should default to the global console.
+
+
+It should send debug messages to console's #log.
+
+
+It should send info and notice messages to console's #info.
+
+
+It should send warn messages to console's #warn.
+
+
+It should send error messages to console's #error.
+
+
+If available, it should send the objects to the formatter.
+
+
+
+ok - test/loggers/console.js
+----------------|----------|----------|----------|----------|-------------------|
+File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
+----------------|----------|----------|----------|----------|-------------------|
+All files | 100 | 100 | 100 | 100 | |
+ lib | 100 | 100 | 100 | 100 | |
+ cologne.js | 100 | 100 | 100 | 100 | |
+ utilities.js | 100 | 100 | 100 | 100 | |
+ lib/formatters | 100 | 100 | 100 | 100 | |
+ simple.js | 100 | 100 | 100 | 100 | |
+ token.js | 100 | 100 | 100 | 100 | |
+ lib/loggers | 100 | 100 | 100 | 100 | |
+ console.js | 100 | 100 | 100 | 100 | |
+ file.js | 100 | 100 | 100 | 100 | |
+----------------|----------|----------|----------|----------|-------------------|