Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
/ level-js Public archive
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

snapshots seem not to work #43

@juliangruber

Description

@juliangruber

this test (simplified for this issue):

test('iterator create snapshot correctly', function (t) {
    db.put('foobatch1', 'bar1', function(err){
      t.error(err)
      var iterator = db.iterator()
      db.del('foobatch1', function () {
        iterator.next(function (err, key, value) {
          t.notOk(err, 'no error')
          t.ok(key, 'got a key')
          t.equal(key.toString(), 'foobatch1', 'correct key')
          t.equal(value.toString(), 'bar1', 'correct value')
          iterator.end(t.end.bind(t))
        })
      })
    })
  })

is failing:

# iterator create snapshot correctly
default_stream.js:27 ok 419 no error
default_stream.js:27 not ok 420 got a key
default_stream.js:27   ---
default_stream.js:27     operator: ok
default_stream.js:27     expected: true
default_stream.js:27     actual:   undefined
default_stream.js:27     at: Test.assert (http://localhost:9966/test.js:12977:17)
default_stream.js:27   ...
iterator-test.js:467 Uncaught TypeError: Cannot read property 'toString' of undefined

@maxogden do you know what's going on here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions