-
Notifications
You must be signed in to change notification settings - Fork 93
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
Umbra js hardhat tests & coverage #157
Conversation
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 awesome!! Great work! Left a few small comments, and also have a question for you here:
First, check out the screenshot of my coverage results:
Notice how umbra-js/src/inner
has zero coverage. That's because this folder and the contract.ts
file it references does not exist! It used to, but we deleted it some time ago. So where is istanbul picking up this folder/file from?
Edit: turns out the answer was that folder/file was cached in the build directory. Running yarn clean && yarn
from the root then re-running coverage fixed it. More info at istanbuljs/nyc#644
Hey @wildmolasses one more comment—can you add the coverage output folders/files to |
b4959ce
to
c47bcfe
Compare
Looks great! Two last things before merging:
|
✅
✅ as @mds1 and I just discussed, we will keep .env files in their subpackage folders for now. Added a bit more instruction to the README suggesting this. |
09f967f
to
15d724a
Compare
I'm officially extremely confused about what's going on here. The PR is showing two commits that don't seem to exist on the branch: When using the latest branch Github will give me, I.e. 15df72, I get the following error trying to run
This looks like the error when I have another network taking that port, but that isn't the case currently. |
Locally I also see 15d724a as the last commit, so it's odd we're both seeing that. Viewing the branch directly also shows 15d724a as the last commit. I see you also tried changing the PR target branch to help update it but it seems that didn't work... 🤔 @apbendi Regarding that error, you might recall that was the issue I kept having! I thought it was from lagging hardhat processes not closing on my machine for some reason, but maybe it's a Hardhat bug? Usually I work around this by running tests "manually", e.g. @wildmolasses In |
@wildmolasses By any chance did you change the order of commits in the rebase before force-pushing? My best guess right now is you might have accidentally changed the order improperly, which is messing things up. The reason I think this is because this PR shows |
This only happens for me on this branch. Any other branches the tests run fine. I wonder if it's related to the error about the infura key in .env? I have a .env, with the infura key set, in both the root repo dir and the contracts dir, so I'm not sure why I'm seeing that error. |
Actually, this might just be a github bug. It seems the PR screen is just showing them in the wrong order for some reason. |
hey guys!
No! all I did was reword an earlier commit to remove its "wip" prefix.
this is my hypothesis too.
Thanks, this is a bug!
@apbendi can you check that your contracts .env is set with an FYI, the workspace root .env was not implemented, so we can delete that .env file. @apbendi I also saw a comment from you that seemed to get deleted concerning @openzeppelin/test-environment. That seems to have lingered in contracts/test/utils.js. Let me remove it. |
Co-authored-by: Matt <[email protected]>
15d724a
to
42ec336
Compare
Signed-off-by: Matt Solomon <[email protected]>
Signed-off-by: wildmolasses <[email protected]>
Resolves #104
Converted umbra-js test suite to use hardhat node/provider. Added coverage package.
Coverage can be run via
cd umbra-js yarn coverage