google / intermock

Mocking library to create mock objects with fake data for TypeScript interfaces
https://google.github.io/intermock/
Apache License 2.0
1.14k stars 71 forks source link

More TypeLiteral / Parenthesis support + customFake #37

Closed ClintFMullins closed 2 years ago

ClintFMullins commented 4 years ago

Hi! I dig this repo but it was missing some support I needed for generating fake data from the way our apollo type gen is outputted (specifcally some TypeLiteral and Parenthesis support). Also, some of the data from faker was a little awkward (super long ipsum strings for id fields) so I wanted to open up a "customFake" option where you can pass a function that will basically return whatever type of fake you want for your primitives.

I wrote this code a while back and just now decided to try and get the changes pushed to the main project. Let me know your thoughts. Thanks!

googlebot commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

ryanmcdermott commented 4 years ago

Thanks for opening this! Can you respond here when you've signed the CLA if you choose to do so? Thank you!

gilbsgilbs commented 4 years ago

Hey! Turns out I'd also have a need for both features. @ClintFMullins are you still working on this PR? I can make a new one if needed.