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

feat(msw): allow regex for entire paths instead of only property names #957

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

GMierzwa
Copy link
Contributor

@GMierzwa GMierzwa commented Oct 3, 2023

Status

READY

Description

Resolves #938.

Allows path regex comparison for mock properties, making it possible for nested properties to be overriden across multiple endpoints.

This could previously be achieved by overriding the parent property, but that required manually mocking all of the parent's properties. Another possibility was to override the child property directly, but this could cause issues if the value had to be different depending on it's parents.

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

@vercel
Copy link

vercel bot commented Oct 3, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @anymaniax on Vercel.

@anymaniax first needs to authorize it.

Copy link
Owner

@anymaniax anymaniax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @GMierzwa, thanks for the pr seems good

@anymaniax anymaniax merged commit 9a4ce8f into anymaniax:master Oct 11, 2023
2 of 3 checks passed
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.

Support Nested Objects in Mock
2 participants