test: make all frequency weights be integer values
This commit is contained in:
parent
b4696ce598
commit
c94749aace
2 changed files with 3 additions and 3 deletions
|
@ -116,7 +116,7 @@ function tableArbitrary(tableSchema, extraArbs, requiredKeys = []) {
|
||||||
return arb;
|
return arb;
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeTransaction({ splitFreq = 1, payeeIds } = {}) {
|
function makeTransaction({ splitFreq = 100, payeeIds } = {}) {
|
||||||
let payeeField = payeeIds
|
let payeeField = payeeIds
|
||||||
? { payee: fc.oneof(...payeeIds.map(id => fc.constant(id))) }
|
? { payee: fc.oneof(...payeeIds.map(id => fc.constant(id))) }
|
||||||
: null;
|
: null;
|
||||||
|
@ -128,7 +128,7 @@ function makeTransaction({ splitFreq = 1, payeeIds } = {}) {
|
||||||
{
|
{
|
||||||
...payeeField,
|
...payeeField,
|
||||||
subtransactions: fc.frequency(
|
subtransactions: fc.frequency(
|
||||||
{ arbitrary: fc.constant([]), weight: 1 },
|
{ arbitrary: fc.constant([]), weight: 100 },
|
||||||
{ arbitrary: fc.array(subtrans), weight: splitFreq }
|
{ arbitrary: fc.array(subtrans), weight: splitFreq }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
@ -319,7 +319,7 @@ describe('transaction executors', () => {
|
||||||
fc
|
fc
|
||||||
.asyncProperty(
|
.asyncProperty(
|
||||||
arbs.makeTransactionArray({
|
arbs.makeTransactionArray({
|
||||||
splitFreq: 0.1,
|
splitFreq: 10,
|
||||||
payeeIds,
|
payeeIds,
|
||||||
maxLength: 100
|
maxLength: 100
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue