-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Location was removed from abstract-leveldown (#494)
* Location was removed from abstract-leveldown * handle location in LevelDOWN constructor * pass a factory function to abstract tests * use tempy and remove cleanup code * Add type check for location in constructor
- Loading branch information
1 parent
ab7c1a5
commit e1ac18d
Showing
26 changed files
with
132 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const test = require('tape') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/batch-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/batch-test') | ||
|
||
abstract.all(leveldown, test) | ||
abstract.all(testCommon.factory, test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const test = require('tape') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/chained-batch-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/chained-batch-test') | ||
|
||
abstract.all(leveldown, test) | ||
abstract.all(testCommon.factory, test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
const test = require('tape') | ||
const testCommon = require('abstract-leveldown/testCommon') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/close-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/close-test') | ||
|
||
module.exports.setUp = function () { | ||
test('setUp', testCommon.setUp) | ||
} | ||
test('setUp', testCommon.setUp) | ||
|
||
module.exports.close = abstract.close | ||
abstract.close(testCommon.factory, test, testCommon) | ||
|
||
module.exports.tearDown = function () { | ||
test('tearDown', testCommon.tearDown) | ||
} | ||
|
||
module.exports.all = function (leveldown) { | ||
module.exports.setUp() | ||
module.exports.close(leveldown, test, testCommon) | ||
module.exports.tearDown() | ||
} | ||
|
||
module.exports.all(leveldown) | ||
test('tearDown', testCommon.tearDown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const testCommon = require('abstract-leveldown/test/common') | ||
const tempy = require('tempy') | ||
const leveldown = require('..') | ||
|
||
testCommon.factory = function () { | ||
return leveldown(tempy.directory()) | ||
} | ||
|
||
module.exports = testCommon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const test = require('tape') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/del-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/del-test') | ||
|
||
abstract.all(leveldown, test) | ||
abstract.all(testCommon.factory, test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const test = require('tape') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/get-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/get-test') | ||
|
||
abstract.all(leveldown, test) | ||
abstract.all(testCommon.factory, test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const test = require('tape') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/iterator-range-test') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/iterator-range-test') | ||
|
||
abstract.all(leveldown, test) | ||
abstract.all(testCommon.factory, test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
const test = require('tape') | ||
const testCommon = require('./common') | ||
const abstract = require('abstract-leveldown/test/leveldown-test') | ||
const leveldown = require('..') | ||
const abstract = require('abstract-leveldown/abstract/leveldown-test') | ||
|
||
abstract.args(leveldown, test) | ||
abstract.args(testCommon.factory, test) | ||
|
||
test('test database creation non-string location throws', function (t) { | ||
t.throws( | ||
leveldown.bind(null, {}), | ||
/constructor requires a location string argument/, | ||
'non-string location leveldown() throws' | ||
) | ||
t.end() | ||
}) |
Oops, something went wrong.