-
Notifications
You must be signed in to change notification settings - Fork 39
fix: fix types and remove typesVersions #139
Conversation
This PR updates aegir and fixes errors with the new ts config and removes typesVersions. `typesVersions` workaround makes TS rewrite imports to `cids` to `cids/src` and because this package doesn't really needs this a workaround its just removed. This should fix libp2p/js-libp2p#839 (comment)
test/cid-util.spec.js
Outdated
before(async () => { | ||
hash = await multihashing(uint8ArrayFromString('abc'), 'sha2-256') | ||
}) | ||
describe('CIDUtil', async () => { |
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 don't believe async
for describe
is supported. It'll work if this can be done within a tick (or so? there's some amount of time that mocha uses to collect all of the tests after running describe()s), but if there's more than a tiny delay then the tests will get entirely dropped from the suite. Doing the setup in an async before()
is the safest bet.
running with 8.2.1, this runs a single test:
describe('foo', async () => {
await new Promise((resolve) => setImmediate(resolve))
it('bar', () => {})
})
but this doesn't run any:
describe('foo', async () => {
await new Promise((resolve) => setTimeout(resolve, 0))
it('bar', () => {})
})
did you also mean to add the @type
to this one like in index.spec.js?
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 looks good to me except for Rod's comment
|
This PR updates aegir and fixes errors with the new ts config and removes typesVersions.
typesVersions
workaround makes TS rewrite imports tocids
tocids/src
and because this package doesn't really needs this a workaround its just removed.This should fix libp2p/js-libp2p#839 (comment)