-
Notifications
You must be signed in to change notification settings - Fork 2
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
Using 'parameterized tests' for 2wp.js pegin tests #89
Using 'parameterized tests' for 2wp.js pegin tests #89
Conversation
Quality Gate passedIssues Measures |
const legacyPeginTestsHappyPath = [ | ||
{ | ||
description: 'should do legacy pegin with one input and one output to the federation', | ||
initialBtcSenderBalancesInBtc: [ MINIMUM_PEGIN_VALUE_IN_BTC ], |
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.
You can fetch this value using an async function. You just need to execute it once you are executing the test.
{ | ||
description: 'should do legacy pegin with multiple inputs from different accounts and one output to the federation', | ||
initialBtcSenderBalancesInBtc: [ MINIMUM_PEGIN_VALUE_IN_BTC, MINIMUM_PEGIN_VALUE_IN_BTC, MINIMUM_PEGIN_VALUE_IN_BTC ], // Each sender is funded with some amount | ||
btcSenderAmountsToSendToFed: [ MINIMUM_PEGIN_VALUE_IN_BTC, MINIMUM_PEGIN_VALUE_IN_BTC, MINIMUM_PEGIN_VALUE_IN_BTC ], // Each sender decides how much to send to the federation |
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.
btcSenderAmountsToSendToFed
seems a bit complex name to me. Maybe peginSenderAmounts
by including pegin, we can assume this refers to funds sent to fed. Wdyt?
return await Promise.all(sendersInfo.map(senderInfo => rskTxHelper.getBalance(senderInfo.rskRecipientRskAddressInfo.address))); | ||
}; | ||
|
||
const legacyPeginTestsHappyPath = [ |
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.
These are not simple legacy pegins. I consider these legacy pegins as border cases, as well as uncommon/complex legacy pegins, at least those ones sending multiple outputs to the fed, since there's no reason for wallet to do that.
That being said, I would add a prefix to this variable like uncommon/complex-LegacyPeginTests
. wdyt?
dbea99a
to
13bf6a7
Compare
No description provided.