Skip to content

Commit

Permalink
change from tap to tape
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphtheninja committed Apr 28, 2015
1 parent 25e333d commit 68096e7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -30,18 +30,18 @@
],
"main": "./abstract-leveldown.js",
"dependencies": {
"xtend": "~3.0.0"
"xtend": "~4.0.0"
},
"devDependencies": {
"tap": "*",
"sinon": "*",
"rimraf": "*"
"rimraf": "~2.3.2",
"sinon": "~1.14.1",
"tape": "~4.0.0"
},
"browser": {
"rimraf": false
},
"scripts": {
"test": "node ./test.js"
"test": "node test.js"
},
"license": "MIT"
}
92 changes: 46 additions & 46 deletions test.js
@@ -1,4 +1,4 @@
const tap = require('tap')
const test = require('tape')
, sinon = require('sinon')
, util = require('util')
, testCommon = require('./testCommon')
Expand All @@ -12,44 +12,44 @@ function factory (location) {

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

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

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

require('./abstract/del-test').setUp(factory, tap.test, testCommon)
require('./abstract/del-test').args(tap.test)
require('./abstract/del-test').setUp(factory, test, testCommon)
require('./abstract/del-test').args(test)

require('./abstract/get-test').setUp(factory, tap.test, testCommon)
require('./abstract/get-test').args(tap.test)
require('./abstract/get-test').setUp(factory, test, testCommon)
require('./abstract/get-test').args(test)

require('./abstract/put-test').setUp(factory, tap.test, testCommon)
require('./abstract/put-test').args(tap.test)
require('./abstract/put-test').setUp(factory, test, testCommon)
require('./abstract/put-test').args(test)

require('./abstract/put-get-del-test').setUp(factory, tap.test, testCommon)
require('./abstract/put-get-del-test').errorKeys(tap.test)
//require('./abstract/put-get-del-test').nonErrorKeys(tap.test, testCommon)
require('./abstract/put-get-del-test').errorValues(tap.test)
//require('./abstract/test/put-get-del-test').nonErrorKeys(tap.test, testCommon)
require('./abstract/put-get-del-test').tearDown(tap.test, testCommon)
require('./abstract/put-get-del-test').setUp(factory, test, testCommon)
require('./abstract/put-get-del-test').errorKeys(test)
//require('./abstract/put-get-del-test').nonErrorKeys(test, testCommon)
require('./abstract/put-get-del-test').errorValues(test)
//require('./abstract/test/put-get-del-test').nonErrorKeys(test, testCommon)
require('./abstract/put-get-del-test').tearDown(test, testCommon)

require('./abstract/approximate-size-test').setUp(factory, tap.test, testCommon)
require('./abstract/approximate-size-test').args(tap.test)
require('./abstract/approximate-size-test').setUp(factory, test, testCommon)
require('./abstract/approximate-size-test').args(test)

require('./abstract/batch-test').setUp(factory, tap.test, testCommon)
require('./abstract/batch-test').args(tap.test)
require('./abstract/batch-test').setUp(factory, test, testCommon)
require('./abstract/batch-test').args(test)

require('./abstract/chained-batch-test').setUp(factory, tap.test, testCommon)
require('./abstract/chained-batch-test').args(tap.test)
require('./abstract/chained-batch-test').setUp(factory, test, testCommon)
require('./abstract/chained-batch-test').args(test)

require('./abstract/close-test').close(factory, tap.test, testCommon)
require('./abstract/close-test').close(factory, test, testCommon)

require('./abstract/iterator-test').setUp(factory, tap.test, testCommon)
require('./abstract/iterator-test').args(tap.test)
require('./abstract/iterator-test').sequence(tap.test)
require('./abstract/iterator-test').setUp(factory, test, testCommon)
require('./abstract/iterator-test').args(test)
require('./abstract/iterator-test').sequence(test)

/*** extensibility ***/

tap.test('test core extensibility', function (t) {
test('test core extensibility', function (t) {
function Test (location) {
AbstractLevelDOWN.call(this, location)
t.equal(this.location, location, 'location set on `this`')
Expand All @@ -61,7 +61,7 @@ tap.test('test core extensibility', function (t) {
;new Test('foobar')
})

tap.test('test open() extensibility', function (t) {
test('test open() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { createIfMissing: true, errorIfExists: false }
Expand Down Expand Up @@ -96,7 +96,7 @@ tap.test('test open() extensibility', function (t) {
t.end()
})

tap.test('test close() extensibility', function (t) {
test('test close() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, test
Expand All @@ -119,7 +119,7 @@ tap.test('test close() extensibility', function (t) {
t.end()
})

tap.test('test get() extensibility', function (t) {
test('test get() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { asBuffer: true }
Expand Down Expand Up @@ -157,7 +157,7 @@ tap.test('test get() extensibility', function (t) {
t.end()
})

tap.test('test del() extensibility', function (t) {
test('test del() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { options: 1 }
Expand Down Expand Up @@ -193,7 +193,7 @@ tap.test('test del() extensibility', function (t) {
t.end()
})

tap.test('test put() extensibility', function (t) {
test('test put() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { options: 1 }
Expand Down Expand Up @@ -232,7 +232,7 @@ tap.test('test put() extensibility', function (t) {
t.end()
})

tap.test('test approximateSize() extensibility', function (t) {
test('test approximateSize() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedStart = 'a start'
Expand All @@ -259,7 +259,7 @@ tap.test('test approximateSize() extensibility', function (t) {
t.end()
})

tap.test('test batch() extensibility', function (t) {
test('test batch() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { options: 1 }
Expand Down Expand Up @@ -305,7 +305,7 @@ tap.test('test batch() extensibility', function (t) {
t.end()
})

tap.test('test chained batch() (array) extensibility', function (t) {
test('test chained batch() (array) extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, expectedOptions = { options: 1 }
Expand Down Expand Up @@ -347,7 +347,7 @@ tap.test('test chained batch() (array) extensibility', function (t) {
t.end()
})

tap.test('test chained batch() (custom _chainedBatch) extensibility', function (t) {
test('test chained batch() (custom _chainedBatch) extensibility', function (t) {
var spy = sinon.spy()
, test

Expand All @@ -374,7 +374,7 @@ tap.test('test chained batch() (custom _chainedBatch) extensibility', function (
t.end()
})

tap.test('test AbstractChainedBatch extensibility', function (t) {
test('test AbstractChainedBatch extensibility', function (t) {
function Test (db) {
AbstractChainedBatch.call(this, db)
t.equal(this._db, db, 'db set on `this`')
Expand All @@ -386,7 +386,7 @@ tap.test('test AbstractChainedBatch extensibility', function (t) {
new Test('foobar')
})

tap.test('test write() extensibility', function (t) {
test('test write() extensibility', function (t) {
var spy = sinon.spy()
, spycb = sinon.spy()
, test
Expand All @@ -406,14 +406,14 @@ tap.test('test write() extensibility', function (t) {
t.equal(spy.getCall(0).thisValue, test, '`this` on _write() was correct')
t.equal(spy.getCall(0).args.length, 1, 'got one argument')
// awkward here cause of nextTick & an internal wrapped cb
t.type(spy.getCall(0).args[0], 'function', 'got a callback function')
t.equal(typeof spy.getCall(0).args[0], 'function', 'got a callback function')
t.equal(spycb.callCount, 0, 'spycb not called')
spy.getCall(0).args[0]()
t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument')
t.end()
})

tap.test('test put() extensibility', function (t) {
test('test put() extensibility', function (t) {
var spy = sinon.spy()
, expectedKey = 'key'
, expectedValue = 'value'
Expand All @@ -439,7 +439,7 @@ tap.test('test put() extensibility', function (t) {
t.end()
})

tap.test('test del() extensibility', function (t) {
test('test del() extensibility', function (t) {
var spy = sinon.spy()
, expectedKey = 'key'
, returnValue
Expand All @@ -463,7 +463,7 @@ tap.test('test del() extensibility', function (t) {
t.end()
})

tap.test('test clear() extensibility', function (t) {
test('test clear() extensibility', function (t) {
var spy = sinon.spy()
, returnValue
, test
Expand All @@ -485,7 +485,7 @@ tap.test('test clear() extensibility', function (t) {
t.end()
})

tap.test('test iterator() extensibility', function (t) {
test('test iterator() extensibility', function (t) {
var spy = sinon.spy()
, expectedOptions = { options: 1, reverse: false, keys: true, values: true, limit: -1, keyAsBuffer: true, valueAsBuffer: true }
, test
Expand All @@ -508,7 +508,7 @@ tap.test('test iterator() extensibility', function (t) {
t.end()
})

tap.test('test AbstractIterator extensibility', function (t) {
test('test AbstractIterator extensibility', function (t) {
function Test (db) {
AbstractIterator.call(this, db)
t.equal(this.db, db, 'db set on `this`')
Expand All @@ -520,7 +520,7 @@ tap.test('test AbstractIterator extensibility', function (t) {
;new Test('foobar')
})

tap.test('test next() extensibility', function (t) {
test('test next() extensibility', function (t) {
var spy = sinon.spy()
, spycb = sinon.spy()
, test
Expand All @@ -540,14 +540,14 @@ tap.test('test next() extensibility', function (t) {
t.equal(spy.getCall(0).thisValue, test, '`this` on _next() was correct')
t.equal(spy.getCall(0).args.length, 1, 'got one arguments')
// awkward here cause of nextTick & an internal wrapped cb
t.type(spy.getCall(0).args[0], 'function', 'got a callback function')
t.equal(typeof spy.getCall(0).args[0], 'function', 'got a callback function')
t.equal(spycb.callCount, 0, 'spycb not called')
spy.getCall(0).args[0]()
t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument')
t.end()
})

tap.test('test end() extensibility', function (t) {
test('test end() extensibility', function (t) {
var spy = sinon.spy()
, expectedCb = function () {}
, test
Expand Down

0 comments on commit 68096e7

Please sign in to comment.