Skip to content
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

Thanks! #256

Closed
rix0rrr opened this issue Dec 12, 2018 · 6 comments
Closed

Thanks! #256

rix0rrr opened this issue Dec 12, 2018 · 6 comments

Comments

@rix0rrr
Copy link

rix0rrr commented Dec 12, 2018

Thank you for writing this magnificent library!

Here are two more issues it found for your showcase:

eemeli/yaml#56
eemeli/yaml#57

(Not the project maintainer, don't know how happy he would be to be featured--but he seemed good-natured about it and tools like this deserve more recognition)

@dubzzz
Copy link
Owner

dubzzz commented Dec 13, 2018

When I used fast-check on js-yaml, I relied on the following Arbitrary:

// Generate valid YAML instances for yaml.safeDump
var key = fc.fullUnicodeString();
var values = [
		  key, fc.boolean(), fc.integer(), fc.double(),
		  fc.constantFrom(null, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY)
];
var yamlArbitrary = fc.object({ key: key, values: values });

Using it might detect other bugs: unicode encoding, rounding issues... You should give it a try too :)

Thanks a lot for the issues :)
I need to find a better way to reference the bugs detected using fast-check, they are very interesting and prove the need for such tests

@dubzzz
Copy link
Owner

dubzzz commented Dec 13, 2018

It might be great to add fast-check tests in the unit tests of the package you referenced :) It should protect the author from adding regressions

@rix0rrr
Copy link
Author

rix0rrr commented Dec 14, 2018

I was about to do that, then I noticed the package is a pure JavaScript package.

Do you think fast-check could be utilized without a TS compiler?

@dubzzz
Copy link
Owner

dubzzz commented Dec 14, 2018

Yes of course, it can be used in any JavaScript project

See:
https://github.com/nodeca/js-yaml

@dubzzz
Copy link
Owner

dubzzz commented Dec 20, 2018

Suggestion of test for the yaml repo: dubzzz/yaml@3a8cb0a

@dubzzz
Copy link
Owner

dubzzz commented Jan 23, 2019

Closing the issue, the PR #287 gathers multiple issues discovered with fast-check in a single page

@dubzzz dubzzz closed this as completed Jan 23, 2019
dubzzz added a commit that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants