-
Notifications
You must be signed in to change notification settings - Fork 191
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
test: Ensure access to reduced counterexamples from fast-check #4631
Conversation
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.
Thanks for noticing this, Richard.
FYI, @dckc, who introduced these tests.
Weird. Their tutorial example treats |
It took some digging, but I think I got to the bottom of it— |
I also opened an issue in fast-check: dubzzz/fast-check#2749 |
test('isEqual is a (total) equivalence relation', t => { | ||
fc.assert( | ||
test('isEqual is a (total) equivalence relation', async t => { | ||
await fc.assert( |
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.
Not needed given the fact that you are using a sync property.
const empty = m.makeEmpty(mockBrand, AssetKind.COPY_BAG); | ||
fc.assert( | ||
await fc.assert( |
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.
Same
const empty = m.makeEmpty(mockBrand, AssetKind.COPY_BAG); | ||
fc.assert( | ||
await fc.assert( |
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.
Same
test('subtract: (x + y) - y = x; (y - x) + x = y if y >= x', t => { | ||
fc.assert( | ||
test('subtract: (x + y) - y = x; (y - x) + x = y if y >= x', async t => { | ||
await fc.assert( |
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.
Same
test('balancesToReachRatio calculations are to spec', t => { | ||
fc.assert( | ||
test('balancesToReachRatio calculations are to spec', async t => { | ||
await fc.assert( |
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.
Same
Only |
6206135
to
8302358
Compare
Ensures proper reporting of reduced counterexamples
8302358
to
3de1d09
Compare
Description
Updates use of fast-check assert to conform with its documentation: https://dubzzz.github.io/fast-check/index.html#assert
Security Considerations
n/a
Documentation Considerations
n/a
Testing Considerations
Noted above.