mongodb-queue
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -76,2 +76,6 @@ /** | ||
if (payload instanceof Array) { | ||
if (payload.length === 0) { | ||
var errMsg = 'Queue.add(): Array payload length must be greater than 0' | ||
return callback(new Error(errMsg)) | ||
} | ||
payload.forEach(function(payload) { | ||
@@ -78,0 +82,0 @@ msgs.push({ |
{ | ||
"name": "mongodb-queue", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Message queues which uses MongoDB.", | ||
@@ -5,0 +5,0 @@ "main": "mongodb-queue.js", |
@@ -67,2 +67,12 @@ var async = require('async') | ||
test('many: add no messages, receive err in callback', function(t) { | ||
var queue = mongoDbQueue(db, 'many') | ||
var messages = [] | ||
queue.add([], function(err) { | ||
if (!err) t.fail('Error was not received') | ||
t.pass('Finished test ok') | ||
t.end() | ||
}); | ||
}) | ||
test('db.close()', function(t) { | ||
@@ -69,0 +79,0 @@ t.pass('db.close()') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73195
1485