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

Remove levelup from destroy tests #136

Merged
merged 1 commit into from
May 28, 2018
Merged

Remove levelup from destroy tests #136

merged 1 commit into from
May 28, 2018

Conversation

ralphtheninja
Copy link
Member

Closes #135

@ralphtheninja ralphtheninja requested a review from vweevers May 28, 2018 13:30
var db = levelup(leveljs(location))
db.put('key', 'value', function (err) {
var db = leveljs(location)
db.open(function (err) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to rewrite tests a bit since levelup takes care of db.open().

db2.open(function (err) {
t.notOk(err, 'no error')
db2.get('key', { asBuffer: false }, function (err, value) {
t.is(err.message, 'NotFound', 'key is not there')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error is different since err.notFound is true due to levelup.

@ralphtheninja ralphtheninja merged commit 9f0e2e5 into master May 28, 2018
@ralphtheninja ralphtheninja deleted the rm-levelup branch May 28, 2018 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants