-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: add ava config and some basic tests #215
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 75b9e3d:
|
per https://github.com/avajs/ava/blob/main/docs/recipes/typescript.md#for-packages-with-type-module we can drop extensions if we pass `--experimental-specifier-resolution=node` to node
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 is fantastic!! I left a couple comments but already pushed fixes for them - happy to back either of my changes out if you don't want them, but I was in the code testing the --experimental-specifier-resolution
change and it was easy to knock them both out
this is already strictly better than what we have now so I'd be happy if you merged as-is!
I think it might be a little cleaner for
I'm worried that a shared |
awesome, thanks for the fixes @travis :) I think you're right that the services package is where it's at. Should we just pull the WIP mock service out of this PR, so it's not cluttering up the joint? It's not being used yet (except in the skipped test). |
to be reborn in the upcoming services package...
Yep that sounds great - probably time to create a new package ( |
oh also maybe just singular |
sweet, this is passing on CI now that I bumped it up to node 18. I'll go ahead and merge now that the mocks are gone. |
This needs some cleanup, but I got ava + typescript to work after a bit of wrestling.
So far I've only added some simple tests to keyring-core that don't depend on the service, but I've also started on a mock access service so we can test
registerSpace
, etc.I had to add
"type": "module"
to the keyring-core package.json to get the ava + typescript setup to work. That seems pretty safe, since we're only including the rollup bundle in the published package, so it shouldn't make a difference to users.It seems like the mock services would be useful for all the packages, so maybe we should make a shared
test-utils
package?