-
Notifications
You must be signed in to change notification settings - Fork 11
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
Let scenarios be composable from other scenarios #29
Comments
This makes a lot of sense - what should happen if If we choose the pattern that resources declared later are used it also allows you to extend a single scenario and just overwrite files directly "emptyShoppingCart": [
"extends": [
"fooScenario"
]
"cart/noItems.json"
] |
It still doesn't get around the problem, since I can still state |
You can use the same logic, the last conflicting mock in the definition is the one that gets used. So anything you explicitly declare will be used as a priority. Be interesting to see what Nabil thinks. This feature however might mean the config of laying out mocks might have to go through a braking change to something more like "userWithCreditHasEmptyCart": {
"extends": [
"someItems",
"userHasCredit"
],
"mocks": [
"cart/empty.json"
]
} |
I think this is a great feature request, and one that is the natural next step for mocking. We should try to add this functionality without breaking backwards compatibility, but if we find an elegant solution that breaks backwards compatibility, we are still a small project so we should go for it. As @chrisiconolly said, this might be worth bumping the project up to v 1.0 for! |
It would be great to have scenarios not just be made up of resources but other scenarios as well.
Maybe something like
The text was updated successfully, but these errors were encountered: