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

Generate string representations of JS objects in fc.object/fc.anything #400

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Aug 16, 2019

Why is this PR for?

The current implementation of fc.object/fc.anything was rarely able to generate strings looking as string representations of real objects. As this kind of objects is a known source of issues in computer science, I wanted to add an easy way to generate some of those instances.

By settings withObjectString to true on your fc.object arbitraries you'll be able to get strings looking as objects more often (as values but also as keys).

In a nutshell

  • New feature
  • Fix an issue
  • Documentation improvement
  • Other: please explain

Potential impacts

No impact expected as the feature has been added as a flag.
We might find ways to put such flag as the default in the future.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 97.016% when pulling aa4b9b7 on feat/extended-string-obj into ba52c39 on master.

@dubzzz dubzzz merged commit 7511d52 into master Sep 23, 2019
@dubzzz dubzzz deleted the feat/extended-string-obj branch September 23, 2019 23:00
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

Successfully merging this pull request may close these issues.

2 participants