-
Notifications
You must be signed in to change notification settings - Fork 791
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
Add Separate API Tests for the VM #315
Conversation
For some reason coveralls is not running on forks, but does this has a >90% coverage of bloom? |
@axic Oh, just realize that the Travis -> CircleCI switch deactivated Coveralls for the moment. Will try to reintroduce this with the next PR. Generally give this some time since work has just started. |
@s1na Cool that you started! 👍 Sorry, as mentioned above test coverage is not working atm, which obviously would be relevant for you to have insight into. Will try to fix soon. |
@holgerd77 thanks for merging the coveralls PR, I was using However, it seems that coveralls has failed again, a little search suggested using |
lib/fakeBlockChain.js
Outdated
@@ -11,6 +11,7 @@ module.exports = { | |||
hash = utils.sha3('0x' + utils.toBuffer(blockTag).toString('hex')) | |||
} else { | |||
cb(new Error('Unknown blockTag type')) | |||
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.
Can you create a PR for this? Should merge it right away. Also usually we follow the pattern return cb(new Error...
, thought it doesn't matter.
Also please note with #295 |
@axic sure, will do both right away |
I also suggest to add a new task to Never mind, you could just require them in https://github.com/ethereumjs/ethereumjs-vm/blob/master/tests/tester.js#L248. However it may be a good idea to introduce |
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
I think it may max sense creating a PR per internal module to get this merged more quickly. @holgerd77 what do you think? |
@axic I just noticed that coverage for |
I think we should include the others in the report too. @holgerd77 what do you think? |
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
Signed-off-by: Sina Mahmoodi <[email protected]>
@holgerd77 @axic Hey guys, I think the PR is ready for your feedback now :) Two cases are failing, which I'm not sure if they should fail. One is bloom's The other case is when A third one also fails, which should be fixed if this is merged. Btw, I haven't still added the api tests to the coverage command, if it should be added, please let me know and I will add it. |
Hi Sina, very cool! 👍 I was unavailable in the last 10 days due to personal reasons and have to catch up a bit, so it can take some more days until I find some time to have a look. |
Follow-up-note: had a first very rough look just to grasp the size. This looks really really great, wonderful, with such a broad and thought-through coverage of usage variants, already thank you very much, this will very much help to keep up the quality within the library! 😄 👍 |
Hey Holger :) thanks for having a look, I'd be indeed really glad if I manage to help EthereumJS which I use directly or indirectly so much, even a tiny bit 😄 |
@s1na can you please create a PR for each component you are testing? I think that could speed up the process a lot. Maybe just create 2 PRs for two components first, and lets see how quickly we can finish them. |
@axic sure thing. I've started creating smaller PRs by cherry-picking these commits. |
Just had a short look, coverage on the library increased from 86% - taking this https://coveralls.io/builds/18728918 PR as a reference - to roughly 93% with the latest merge https://coveralls.io/builds/19299976, so so great!!! 👍 👍 👍 😄 Some detailed stats: index.js: 82.35% -> 92.65% 🏆 🏆 🏆 I know this is tempting, but don't sit down immediately and try to further improve this 😄, if this was the last PR we should really make some (short, hehe) break here. I think I'll write out another bounty with a second round on this. |
We did it! 🎉 🎉 🦄 :) A break sounds good 🍷 Thanks a lot Holger for bearing with me, and the guidance throughout the process 😄 I believe this PR can be closed. |
Great work @s1na! (& @holgerd77) |
Fixes #310.
This PR will attempt to implement the tests mentioned in #310, however it is still in the very early stages.
I will try to refactor as the PR progresses and the need arises. Please let me know if the structure could be improved, or you want test cases added/removed/modified, or there are any other issues with it.