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

📝 Add examples for: fc.string(), fc.integer(), fc.nat(), fc.dictionary() and fc.array() #5317

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zetos
Copy link

@zetos zetos commented Oct 6, 2024

Description

This PR adds a few examples for fc.string(), fc.integer(), fc.nat(), fc.dictionary() and fc.array(). Extracted from the Fast-Check documentation page. The goal is to improve developer understanding by embedding usage examples directly into the codebase.

ChecklistDon't delete this checklist and make sure you do the following before opening the PR

  • The name of my PR follows gitmoji specification
  • My PR references one of several related issues (if any)
    • New features or breaking changes must come with an associated Issue or Discussion
    • My PR does not add any new dependency without an associated Issue or Discussion
  • My PR includes bumps details, please run yarn bump and flag the impacts properly
  • My PR adds relevant tests and they would have failed without my PR (when applicable)

Advanced

  • Category: 📝 Add or update documentation
  • Impacts: N/A

@zetos zetos requested a review from dubzzz as a code owner October 6, 2024 19:48
Copy link

changeset-bot bot commented Oct 6, 2024

⚠️ No Changeset found

Latest commit: da3ced6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Oct 6, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit da3ced6:

Sandbox Source
@fast-check/examples Configuration

@dubzzz
Copy link
Owner

dubzzz commented Oct 9, 2024

Thanks a lot for the contribution and suggestion, based on the cost of keeping these examples up-to-date I'm wondering if we should plug a system similar to the one we have for the documentation before merging it.

In the context of the documentation, the examples are being generated by a dedicated test. If one example mismatches the CI breaks and the code cannot be merged without updating the examples. Such a mechanism saved me several times plus dropped an extra maintenance cost by making it automatic.

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