Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/database_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,26 @@ describe('db', () => {
db.stop();
});

it('uses get_keys_below throw_exception_in_callback test', () => {
function ex(key) {
throw new Error('TestException');
}
const db = new pmemkv.db(ENGINE, CONFIG);
db.put('A', '1');
db.put('AB', '2');
db.put('AC', '3');
db.put('B', '4');
db.put('BB', '5');
db.put('BC', '6');

try {
db.get_keys_below('B', ex);
} catch (e) {
expect(e.message).to.equal('TestException');
}
db.stop();
});

it('uses get_keys_between test', () => {
const db = new pmemkv.db(ENGINE, CONFIG);
db.put('A', '1');
Expand Down