Closed Artem-Nanavov closed 10 months ago
I think this can be done with a much simpler solution, after calling transformJSONSchemaToFakerCode
, we can put it in a new Function
and run it once so it get a static data, I've already implemented it and will create another pull request soon
@Artem-Nanavov pls check this out https://github.com/zoubingwu/msw-auto-mock/pull/43
@zoubingwu I checked, your solution's better than mine. I'm closing my MR. ;-)
Hello everybody. So, here what I did. ; )
What? Added an option for generating static mocks.
Why? Firstly, we have an issue for this. ))
Some people can you this lib for generate mocks (prefer static) and use it for visual regression test, right now we can't give this option, but this PR fix this problem.
If you want to generate static mock - just add
--static
flag into command and run.How?
cli.ts
.P.S. If you know how to make it more simple, comment below. ))