aedes-persistence
Advanced tools
Comparing version 9.0.2 to 9.0.3
@@ -56,3 +56,3 @@ const { Readable } = require('stream') | ||
function iterableStream (stream) { | ||
if (typeof stream[Symbol.iterator] !== 'function') { | ||
if (typeof stream[Symbol.asyncIterator] !== 'function') { | ||
return new Readable({ objectMode: true }).wrap(stream) | ||
@@ -131,2 +131,6 @@ } | ||
function deClassed (obj) { | ||
return Object.assign({}, obj) | ||
} | ||
test('store and look up retained messages', t => { | ||
@@ -954,4 +958,4 @@ matchRetainedWithPattern(t, 'hello/world') | ||
if (queue.length === 2) { | ||
t.deepEqual(queue[0], updated1) | ||
t.deepEqual(queue[1], updated2) | ||
t.deepEqual(deClassed(queue[0]), deClassed(updated1)) | ||
t.deepEqual(deClassed(queue[1]), deClassed(updated2)) | ||
} | ||
@@ -1101,3 +1105,4 @@ instance.destroy(t.end.bind(t)) | ||
t.notEqual(list[0], updated, 'must not be the same object') | ||
t.deepEqual(list, [updated], 'must return the packet') | ||
t.deepEqual(deClassed(list[0]), deClassed(updated), 'must return the packet') | ||
t.equal(list.length, 1, 'must return only one packet') | ||
instance.destroy(t.end.bind(t)) | ||
@@ -1150,3 +1155,4 @@ }) | ||
t.notEqual(list[0], updated2, 'must not be the same object') | ||
t.deepEqual(list, [updated2], 'must return the packet') | ||
t.deepEqual(deClassed(list[0]), deClassed(updated2), 'must return the packet') | ||
t.equal(list.length, 1, 'must return only one packet') | ||
instance.destroy(t.end.bind(t)) | ||
@@ -1153,0 +1159,0 @@ }) |
{ | ||
"name": "aedes-persistence", | ||
"version": "9.0.2", | ||
"version": "9.0.3", | ||
"description": "The spec for an Aedes persistence, with abstract tests and a fast in-memory implementation.", | ||
@@ -5,0 +5,0 @@ "main": "persistence.js", |
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
77187
2032