zoubingwu / msw-auto-mock

A cli tool to generate random mock data from OpenAPI definition for msw.
273 stars 57 forks source link

fix: return promise from `start` call so that it can be awaited #49

Closed astone123 closed 3 months ago

astone123 commented 5 months ago

This PR updates the setup code part of the template to return the promise from worker.start(). I had to update my template to return this so that I could make sure that msw was setup before rendering my app. I figure it should be the default

zoubingwu commented 3 months ago

since 0.19.0, --node, --react-native options was removed, and it will always output following files to a folder:

browser.js
native.js
node.js
handlers.js