Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants