Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 810bc0a

Browse files
committed
Add stream test to test/legacy/plugin.js
1 parent da22c0a commit 810bc0a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/legacy/plugin.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ describe('retry-on-429 plugin #db', function() {
113113
setTimeout(done, 1000);
114114
});
115115

116+
it('should return a stream', function(done) {
117+
var mocks = nock(SERVER)
118+
.get('/' + dbName).reply(200, { ok: true });
119+
var cloudant = Cloudant({plugins: 'retry', url: SERVER, username: ME, password: PASSWORD});
120+
var dbs = cloudant.db.listAsStream(function() {
121+
done();
122+
});
123+
assert.equal(dbs instanceof PassThroughDuplex, true);
124+
});
125+
116126
it('should return a promise', function(done) {
117127
var mocks = nock(SERVER)
118128
.get('/' + dbName).reply(200, { ok: true });

0 commit comments

Comments
 (0)