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

[Testing] Introduce the fake crate for helping to create faked data instead of repeating boilerplate initializations in tests #4446

Closed
cylewitruk opened this issue Feb 28, 2024 · 2 comments

Comments

@cylewitruk
Copy link
Member

There are a number of situations where the need for initializing complex types with "faked", but still valid, exists -- primarily in the context of tests. Currently, most tests are using boilerplate code for this, or some tests simply just don't exist likely due to the complexity of creating these objects by hand.

The fake crate makes this a breeze, providing a number of out-of-the-box generators but also allowing full customization of how types, or even specific fields of a type (for example Strings), are generated. The idea here is that this should help to remove a lot of the mental "hinders" from writing good tests involving complex objects.

This ticket is a placeholder for introducing the crate into projects and defining generators for the most commonly used types.

You can see an example of the crate in-use in my PR here.

@cylewitruk
Copy link
Member Author

Closing this issue in favor of #4501.

@cylewitruk cylewitruk closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
@github-project-automation github-project-automation bot moved this from Status: 🆕 New to Status: ✅ Done in Stacks Core Eng Mar 7, 2024
@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

2 participants