You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thanks for this library! I use it at work to run faked e2e tests, this lib is a big help.
Is your feature request related to a problem? Please describe.
While this lib works great with an express server, it would be nice to be able synchronously generate mocked objects without a need for a server.
I use this lib for testing, but it would also be great for e2e documentation in Storybook. I am envisioning a setup where we have our component stories pre-populated with mocked fixtures, this lets us document the full user flow from frontend to server.
Describe the solution you'd like
Currently, I would need to deploy an express server along with the build Storybook bundle (it just gets built as a static js bundle), so having the ability to do something like this would be awesome
constopenApiMock=newOpenApiMock({spec: 'path/to/doc'})constTemplate: Story<React.ComponentProps<typeofReview>>=()=><Review/>;exportdefault{title: 'something',component: SomeComponent}asMeta;exportconstDefault=Template.bind({});Default.parameters={// synchronously generates mock api responseapiResult: openApiMock.produce({// provide http request params that would match a request described by the openapi docroute: '/blah',query: {locale: 'en'},body: { ...bodyParams}})};
The text was updated successfully, but these errors were encountered:
daniellizik
changed the title
Feature: generate a mock object according to a spec without a server or middleware
Feature: synchronously generate a mock object according to a spec without a server or middleware
Oct 27, 2021
Hello, thanks for this library! I use it at work to run faked e2e tests, this lib is a big help.
Is your feature request related to a problem? Please describe.
While this lib works great with an express server, it would be nice to be able synchronously generate mocked objects without a need for a server.
I use this lib for testing, but it would also be great for e2e documentation in Storybook. I am envisioning a setup where we have our component stories pre-populated with mocked fixtures, this lets us document the full user flow from frontend to server.
Describe the solution you'd like
Currently, I would need to deploy an express server along with the build Storybook bundle (it just gets built as a static js bundle), so having the ability to do something like this would be awesome
The text was updated successfully, but these errors were encountered: