Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
testing both handles
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Sep 24, 2014
1 parent 93f1300 commit d48ad37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/bytewise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var datadir = path.join(tmpdir, 'level-party-' + Math.random());
var lopts = { keyEncoding: bytewise, valueEncoding: 'json' };

test('bytewise key encoding', function (t) {
t.plan(5);
t.plan(7);
var adb = level(datadir, lopts);
var bdb = level(datadir, lopts);
var value = Math.floor(Math.random() * 100000);
Expand All @@ -23,6 +23,10 @@ test('bytewise key encoding', function (t) {
t.equal(x, value);
});

adb.createReadStream().on('data', function (row) {
t.deepEqual(row.key, [ 'a' ]);
t.deepEqual(row.value, value);
});
bdb.createReadStream().on('data', function (row) {
t.deepEqual(row.key, [ 'a' ]);
t.deepEqual(row.value, value);
Expand Down

0 comments on commit d48ad37

Please sign in to comment.