How to use the abstract-leveldown/abstract/iterator-test.all function in abstract-leveldown

To help you get started, we’ve selected a few abstract-leveldown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github davidguttman / dynamodown / test / index.js View on Github external
}

/*** compatibility with basic LevelDOWN API ***/

require('abstract-leveldown/abstract/leveldown-test').args(leveldown, test, testCommon)

require('abstract-leveldown/abstract/open-test').args(leveldown, test, testCommon)
require('abstract-leveldown/abstract/open-test').open(leveldown, test, testCommon)

require('abstract-leveldown/abstract/del-test').all(leveldown, test, testCommon)
require('abstract-leveldown/abstract/get-test').all(leveldown, test, testCommon)
require('abstract-leveldown/abstract/put-test').all(leveldown, test, testCommon)
require('abstract-leveldown/abstract/batch-test').all(leveldown, test, testCommon)

require('abstract-leveldown/abstract/close-test').close(leveldown, test, testCommon)
require('abstract-leveldown/abstract/iterator-test').all(leveldown, test, testCommon)
require('abstract-leveldown/abstract/ranges-test').all(leveldown, test, testCommon)

// Not passing:
// // require('abstract-leveldown/abstract/put-get-del-test').all(leveldown, test, testCommon, testBuffer)
// require('abstract-leveldown/abstract/chained-batch-test').all(leveldown, test, testCommon)
github mafintosh / level-events / test / index.js View on Github external
var down = function(loc) {
  return eventsdown(memdown(loc), new events.EventEmitter())
}

/*** compatibility with basic LevelDOWN API ***/

require('abstract-leveldown/abstract/open-test').args(down, test, testCommon)
require('abstract-leveldown/abstract/open-test').open(down, test, testCommon)
require('abstract-leveldown/abstract/del-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/get-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-get-del-test').all(down, test, testCommon, testBuffer)
require('abstract-leveldown/abstract/batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/chained-batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/close-test').close(down, test, testCommon)
require('abstract-leveldown/abstract/iterator-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/ranges-test').all(down, test, testCommon)

test('put event', function(t) {
  var db = levelup('test', {db:down})
  install(db).on('write', function(key, value) {
    t.same(key, 'test')
    t.same(value, 'test-value')
    t.end()
  })
  db.put('test', 'test-value')
})

test('get event', function(t) {
  var db = levelup('test', {db:down})
  install(db).on('write', function(key, value) {
    t.same(key, 'test')
github hypermodules / level-hookdown / test / index.js View on Github external
var hookdown = require('../leveldown')
var levelup = require('levelup')
var memdown = require('memdown')
var testCommon = require('./common')
var testBuffer = new Buffer('this-is-test-data')

require('abstract-leveldown/abstract/open-test').args(down, test, testCommon)
require('abstract-leveldown/abstract/open-test').open(down, test, testCommon)
require('abstract-leveldown/abstract/del-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/get-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-get-del-test').all(down, test, testCommon, testBuffer)
require('abstract-leveldown/abstract/batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/chained-batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/close-test').close(down, test, testCommon)
require('abstract-leveldown/abstract/iterator-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/ranges-test').all(down, test, testCommon)

function down (loc) {
  return hookdown(levelup(loc, {db: memdown}))
}
github cshum / level-transactions / test / leveldown.js View on Github external
locks = []
  t.end()
}

var down = txdown(db, createLock)

require('abstract-leveldown/abstract/leveldown-test').args(down, test, testCommon)
require('abstract-leveldown/abstract/open-test').args(down, test, testCommon)
require('abstract-leveldown/abstract/del-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/get-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/put-get-del-test').all(down, test, testCommon, testBuffer)
require('abstract-leveldown/abstract/batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/chained-batch-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/close-test').close(down, test, testCommon)
require('abstract-leveldown/abstract/iterator-test').all(down, test, testCommon)
require('abstract-leveldown/abstract/ranges-test').all(down, test, testCommon)