question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Properties failed when ran using fast-check instead of jsverify

See original GitHub issue

Hello,

I ran the code of HdrHistogramJS against fast-check instead of jsverify while keeping the same properties and got an error in the test Histogram percentile computation / should be accurate according to its significant figures.

It failed with the following values:

{
"numbers":[1,273731571431425,9,7303993364561409,50,52,3751386548413441,4948256072812545,5491625052831745,37,6820721518315521,1574333073423361,4066896780404737,191939336521729,3913963619305473,26,2081131494695681,9,3073654167648769,4231391955982337,14,4088907194638337,7341523045991425,3242270122483201,22,8280565622691841,614007688308737,2269465752221185,52,6254379374366721,8631834766189569,5165852549298177,48,481559528507393,27,6095148584763393,6494913181050113,4146783990091777,4273437989623809,38,9,1,52,8268765467165697,4606074649282561,46,4408679411453953,4459593769963521,7,37,16,5090951553114113,19,33,51,50,8899584853504001,47,17,6408401069544449,3552700696961537,44,8,7898351911549441,7866448145080321,33,8199056252950017,27,8989833384898561,43,652641750147073,5595306040501249,11,8383692575115265,33,1867658007780353,18,8,35,46,2491766237109249,32,34,10,1,1841170092118017,4596838152228865,33,25,22,3229546595876865,25,49,788556722442241,5070788145520641,7348438610689025,6882393879584769,18,8700569757159425,2367777250240513],
"actual":8206027174371586,
"got":7349135720054783,
"relativeError":0.10442220530209534,
"variation":0.001,
"bitBucketSize":8
}

As I don’t really know if this can be considered as a real issue, I have not push anything forward. The migration commit to fast-check is available at https://github.com/dubzzz/HdrHistogramJS/commit/2d9443ecb8885d5ab6bc0c9b951d7a2df6425706

Please let me know if it is a real failure of the property. If so I can give you an hand on fixing this problem if needed.

Regards, Nicolas

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alexvictoorcommented, Oct 9, 2018

Hello Nicolas Sorry I have not seen your issue before. Thanks a lot for this fast-check migration commit 😃 It is on my todo list from quite some time but you know… Anyway I will try to take a look at this issue, why it fails with fast-check, this week. Cheers

Alex

0reactions
dubzzzcommented, Nov 15, 2018

Closing the issue as the problem as been fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get started with property-based testing in JavaScript ...
Generating test data. With property tests, we get the computer to generate examples for us. Fast-check calls these example-generators ' ...
Read more >
Better error reporting / logging with properties that failed #234
I am using this to test output of functions with different inputs. JsVerify provides me a counter example but does not provide the...
Read more >
fast-check - Property based testing for JavaScript and TypeScript
Property based testing is another way to test programs. Instead of relying on hard-coded inputs and outputs, it checks characteristics of the output...
Read more >
The Magic of Generative Testing: Fast-Check in JavaScript
Generative testing (aka property testing), popularized by the Haskell library QuickCheck, is a technique of:- specifying invariant laws your ...
Read more >
Property-based Testing with Fast-check in TypeScript - YouTube
Property -based testing is for people who do not like to write unit tests. Instead of providing examples, you provide a fact that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found