Replies: 1 comment 3 replies
-
If your keys are strings, you can use const arbitraryMap = fc.dictionary(fc.string(), fc.nat())
.map(dict => new Map(Object.entries(dict)))
console.log( fc.sample(arbitraryMap, 5) ) Map(1) { 'CxbD!_' => 1135090401 },
Map(3) { 'q`' => 2113644272, ' x&~' => 27, '~}!t|z~y' => 25 },
Map(1) { '_#3' => 1738777444 },
Map(4) {
'|call}&b #' => 9,
'\\^!+L(' => 28,
'' => 1752156948,
'c' => 163999411
},
Map(7) {
'I>U){' => 1984610647,
'KEeeK' => 1524839195,
'sAZ' => 937344058,
'' => 529998270,
'Gd2#<=ZHr}' => 1135358149,
'a;kS4rzo' => 1594872950,
':(' => 641853712
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have code that uses
.entries
and none of the current map-ish arbs support that.New user here so maybe I've missed something!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions