fix: revert changes to weights and pin fast-check version to 2.13.0

This commit is contained in:
Tom French 2022-07-08 21:19:48 +01:00
parent c94749aace
commit 2846166a8e
3 changed files with 12 additions and 12 deletions

View file

@ -28,7 +28,7 @@
"csv-parse": "^4.10.1",
"csv-stringify": "^5.3.6",
"deep-equal": "^2.0.5",
"fast-check": "^2.11.0",
"fast-check": "2.13.0",
"google-protobuf": "^3.12.0-rc.1",
"md5": "^2.3.0",
"mitt": "^2.1.0",

View file

@ -116,7 +116,7 @@ function tableArbitrary(tableSchema, extraArbs, requiredKeys = []) {
return arb;
}
function makeTransaction({ splitFreq = 100, payeeIds } = {}) {
function makeTransaction({ splitFreq = 0.1, payeeIds } = {}) {
let payeeField = payeeIds
? { payee: fc.oneof(...payeeIds.map(id => fc.constant(id))) }
: null;
@ -128,7 +128,7 @@ function makeTransaction({ splitFreq = 100, payeeIds } = {}) {
{
...payeeField,
subtransactions: fc.frequency(
{ arbitrary: fc.constant([]), weight: 100 },
{ arbitrary: fc.constant([]), weight: 1 },
{ arbitrary: fc.array(subtrans), weight: splitFreq }
)
},

View file

@ -7230,12 +7230,12 @@ fake-indexeddb@^3.1.3:
dependencies:
realistic-structured-clone "^2.0.1"
fast-check@^2.11.0:
version "2.23.2"
resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.23.2.tgz#375c01827a9d58916c8a0ad463d1f17fe8e6ae4b"
integrity sha512-ECYuSlp6NLpvOj8eScKsqoz1ihtCpSDuEC2ofdGvgsEu1obHYEGqreJ/iPzkJFy73yoU0kCFea7PHUQDNM0VNg==
fast-check@2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.13.0.tgz#92a50a6a39b58760d4b0b52b12f98f28a9f020f6"
integrity sha512-IOfzKm/SCA+jpUEgAfqAuxHYPmgtmpnnwljQmYPRGrqYczcTKApXKHza/SNxFxYkecWfZilYa0DJdBvqz1bcSw==
dependencies:
pure-rand "^5.0.1"
pure-rand "^4.1.1"
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
@ -13649,10 +13649,10 @@ pupa@^2.1.1:
dependencies:
escape-goat "^2.0.0"
pure-rand@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.1.tgz#97a287b4b4960b2a3448c0932bf28f2405cac51d"
integrity sha512-ksWccjmXOHU2gJBnH0cK1lSYdvSZ0zLoCMSz/nTGh6hDvCSgcRxDyIcOBD6KNxFz3xhMPm/T267Tbe2JRymKEQ==
pure-rand@^4.1.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.2.1.tgz#14c08ab1cebce0eb95b987638039742a1006a695"
integrity sha512-ESI2eqHP9JlrnTb7H7fgczRUWB6VxMMJ2m9870WCIBhYkBzSGd6gml6WhQVXHK+ZM8k70TqsyI28ixaLPaNz5g==
q@^1.1.2:
version "1.5.1"