-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 3
Lines 86 65 -21
=====================================
- Hits 86 65 -21
Continue to review full report at Codecov.
|
const traverse = function * (node, path) { | ||
// Traverse only objects and arrays | ||
if (Buffer.isBuffer(node) || CID.isCID(node) || typeof node === 'string' || | ||
node === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
==
test/resolver.spec.js
Outdated
it('should return the version', (done) => { | ||
verifyPath(fixtureBlockHeader, 'version', 4, done) | ||
it('should return the version', async () => { | ||
await verifyPath(fixtureBlockHeader, 'version', 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/await/return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(IMO)
test/resolver.spec.js
Outdated
done() | ||
}) | ||
const verifyError = async (block, path, error) => { | ||
await expect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be replaced with a return
and probably even remove the async
so it's just a simple Promise returning function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep the async
as I like to signal that it's returning a Promise. As it's in tests I don't mind the performance implications (in case there are any).
|
BREAKING CHANGE: The API is now async/await based There are numerous changes, the most significant one is that the API is no longer callback based, but it using async/await. For the full new API please see the [IPLD Formats spec]. [IPLD Formats spec]: https://github.com/ipld/interface-ipld-format
BREAKING CHANGE: The API is now async/await based
There are numerous changes, the most significant one is that the API
is no longer callback based, but it using async/await.
For the full new API please see the IPLD Formats spec.