Skip to content

Commit bb5c626

Browse files
committed
added another test
1 parent 2dd256e commit bb5c626

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/20.statement.run.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,13 @@ describe('Statement#run()', function () {
125125
expect(function () {
126126
db.prepare('INSERT INTO entries VALUES (@a, @b, @c, @d)').run(new Foo);
127127
}).to.throw(Error);
128+
129+
// This part of the test may fail is Statement#get() does not work.
130+
var i = 0;
131+
var row;
132+
while (row = db.prepare('SELECT * FROM entries WHERE rowid=' + ++i).get()) {
133+
expect(row).to.deep.equal({a: 'foo', b: 25, c: 25, d: Buffer.alloc(8).fill(0xdd)})
134+
}
135+
expect(i).to.equal(9);
128136
});
129137
});

0 commit comments

Comments
 (0)