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

Commit 31b66cf

Browse files
committed
Clarify expected behavior in iterator-test
1 parent 3f882dd commit 31b66cf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/iterator-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ make('close db with open iterator', function (db, t, done) {
7171

7272
ite.next(function loop (err, key, value) {
7373
if (cnt++ === 0) {
74+
// The first call should succeed, because it was scheduled before close()
7475
t.ifError(err, 'no error from next()')
7576
} else {
77+
// The second call should fail, because it was scheduled after close()
7678
t.equal(err.message, 'iterator has ended')
7779
hadError = true
7880
}

0 commit comments

Comments
 (0)