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

Add tests for for await...of db.iterator() #91

Closed
vweevers opened this issue Sep 26, 2021 · 0 comments · Fixed by #89
Closed

Add tests for for await...of db.iterator() #91

vweevers opened this issue Sep 26, 2021 · 0 comments · Fixed by #89
Labels
test Improvements or additions to tests

Comments

@vweevers
Copy link
Member

Added in Level/abstract-leveldown#379. Needs tests here.

@vweevers vweevers added the test Improvements or additions to tests label Sep 26, 2021
vweevers added a commit that referenced this issue Sep 28, 2021
In other states (besides 'open') a 'Database is not open' error is
now thrown. This reduces the scope of `deferred-leveldown` to what's
strictly needed in `levelup` and aligns behavior.

In addition, override public methods of `abstract-leveldown` instead
of private methods. This has one downside: they need to do the same
callback to promise conversion that `abstract-leveldown` does. The
upside is that operation callbacks are not called before the db has
finished opening, including in cases where `abstract-leveldown` has
a fast-path, like on `db.batch([])` which because the array is
empty bypasses `_batch()`.

Closes #91
Closes #90
vweevers added a commit that referenced this issue Sep 28, 2021
In other states (besides 'open') a 'Database is not open' error is
now thrown. This reduces the scope of `deferred-leveldown` to what's
strictly needed in `levelup` and aligns behavior.

In addition, override public methods of `abstract-leveldown` instead
of private methods. This has one downside: they need to do the same
callback to promise conversion that `abstract-leveldown` does. The
upside is that operation callbacks are not called before the db has
finished opening, including in cases where `abstract-leveldown` has
a fast-path, like on `db.batch([])` which because the array is
empty bypasses `_batch()`.

Closes #91
Closes #90
vweevers added a commit that referenced this issue Sep 30, 2021
In other states (besides 'open') a 'Database is not open' error is
now thrown. This reduces the scope of `deferred-leveldown` to what's
strictly needed in `levelup` and aligns behavior.

In addition, override public methods of `abstract-leveldown` instead
of private methods. This has one downside: they need to do the same
callback to promise conversion that `abstract-leveldown` does. The
upside is that operation callbacks are not called before the db has
finished opening, including in cases where `abstract-leveldown` has
a fast-path, like on `db.batch([])` which because the array is
empty bypasses `_batch()`.

Closes #91
Closes #90
vweevers added a commit that referenced this issue Sep 30, 2021
In other states (besides 'open') a 'Database is not open' error is
now thrown. This reduces the scope of `deferred-leveldown` to what's
strictly needed in `levelup` and aligns behavior.

In addition, override public methods of `abstract-leveldown` instead
of private methods. This has one downside: they need to do the same
callback to promise conversion that `abstract-leveldown` does. The
upside is that operation callbacks are not called before the db has
finished opening, including in cases where `abstract-leveldown` has
a fast-path, like on `db.batch([])` which because the array is
empty bypasses `_batch()`.

Closes #91
Closes #90
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
test Improvements or additions to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant