diff options
author | Minteck <contact@minteck.org> | 2021-12-21 16:50:49 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-21 16:50:49 +0100 |
commit | 20204baf1807825af4798ad03bfb329e4da05bc5 (patch) | |
tree | 1568515fa1e4592206ed5d2327b39e6b443cbd03 /node_modules/winston/test/transports/memory-test.js | |
download | bingoloto-remote-20204baf1807825af4798ad03bfb329e4da05bc5.tar.gz bingoloto-remote-20204baf1807825af4798ad03bfb329e4da05bc5.tar.bz2 bingoloto-remote-20204baf1807825af4798ad03bfb329e4da05bc5.zip |
Commit
Diffstat (limited to 'node_modules/winston/test/transports/memory-test.js')
-rw-r--r-- | node_modules/winston/test/transports/memory-test.js | 31 |
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 |