summaryrefslogtreecommitdiff
path: root/node_modules/winston/test/transports/memory-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/winston/test/transports/memory-test.js')
-rw-r--r--node_modules/winston/test/transports/memory-test.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/winston/test/transports/memory-test.js b/node_modules/winston/test/transports/memory-test.js
new file mode 100644
index 0000000..e8e1043
--- /dev/null
+++ b/node_modules/winston/test/transports/memory-test.js
@@ -0,0 +1,31 @@
+var path = require('path'),
+ vows = require('vows'),
+ assert = require('assert'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var npmTransport = new (winston.transports.Memory)(),
+ syslogTransport = new (winston.transports.Memory)({ levels: winston.config.syslog.levels });
+
+vows.describe('winston/transports/memory').addBatch({
+ "An instance of the Memory Transport": {
+ "with npm levels": {
+ "should have the proper methods defined": function () {
+ helpers.assertMemory(npmTransport);
+ },
+ "the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ },
+ "with syslog levels": {
+ "should have the proper methods defined": function () {
+ helpers.assertMemory(syslogTransport);
+ },
+ "the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ }
+}).export(module); \ No newline at end of file