Skip to content

Commit

Permalink
add string test back in
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Sep 8, 2015
1 parent 294b8aa commit 58ec386
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,23 @@ function tests(dbName, dbType) {
});
});

it('should dump to a string', function () {

var MemoryStream = require('memorystream');

var dumpedString = '';
var readStream = new MemoryStream();
readStream.on('data', function (chunk) {
dumpedString += chunk.toString();
});

return db.put({_id: '1'}).then(function () {
return db.dump(readStream);
}).then(function () {
dumpedString.should.be.a('string', 'got a string');
});
});

it('should dump and load using string', function () {
var dumpedString = '';
var readStream = new MemoryStream();
Expand Down

0 comments on commit 58ec386

Please sign in to comment.