-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Some transaction tests were not run… #1229
Conversation
…t. Fixed this so they are run and fixed one test that still assumed the dust limit at 5460 instead of 546.
The reason the test coverage didn't increase is because there are some ifs that used to only take the true branch and now they also take the false branch, but that doesn't increase the number of lines/statements covered because they don't have an else block. Pull request #1226 restructured these ifs which uncovered the missing coverage. |
Good catch. We may want to run these instead by doing: it('can skip the check for too much fee', function() {
buildSkipTest(function(transaction) {
//...
}, 'disableLargeFees')();
}); |
Why? buildSkipTest already returns a function. The extra wrapper doesn't add anything except another stack frame, and (apparently) an easy way to hide when a test is not run. Or am I missing something? |
Right, build returns a function (and without a first argument). |
Which first argument? Another option is to rename buildSkipTest to doSkipTest and make it actually perform the test instead of return a function. Then I just invoke that from the actual test. What do you think? |
I think it's good the way you have it now. |
Some transaction tests were not run…
Some transaction tests were not run because of the way they were built. The builder was invoked, but the built test wasn't. Fixed this so they are run and fixed one test that still assumed the dust limit at 5460 instead of 546.