Skip to content
Discussion options

You must be logged in to vote

That's because I was being dumb, and while trying to reproduce the issue I accidentally changed the way values were being generated.

So the code responsible is here:

const bigDecimalArbitrary = (): LazyArbitrary<bigDecimal_.BigDecimal> => (fc) =>

Here fc.integer({ min: 0, max: 18 }) generates the scale.

const bigDecimalArbitrary = (): LazyArbitrary<bigDecimal_.BigDecimal> => (fc) =>
  fc.tuple(fc.bigInt(), fc.integer({ min: 0, max: 18 }))
    .map(([value, scale]) => bigDecimal_.make(value, scale))

I guess we could tweak that, maybe to fc.integer({ min: -18, max: 18 })?

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@tobold
Comment options

@gcanti
Comment options

Answer selected by tobold
@tobold
Comment options

@gcanti
Comment options

@gcanti
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants