Emulative is a VSCode extension which helps developers speed up testing by creating mock objects representing TypeScript types straight from Visual Studio Code.
You can use Emulative to produce Typescript objects, Json objects or builder functions from Typescript types:
Copy Typescript objects
Copy Json objects
Create a scratch file with Typescript objects
Create a builder function
To use Emulative:
You can overwrite certain properties by updating the Prop Overrides setting under
Emulative is hugely dependent on the wonderful work from the team who created intermock. Therefore, the types supported by Emulative match those supported by intermock. If Emulative encounters a type it isn't able to handle it will try and create a stub where possible or ignore the type completely. We are hoping to improve the types handled by Emulative in future releases.
Emulative is able to produce a mock type from a type which is defined in another file at one level. However, it does not currently support types with references to other types which are spread across multiple files. We are hoping to address this limitation in the next release.
v1 release of Emulative, includes:
Initial release of Emulative, includes ability to:
Like most software these days, this wouldn't be posssible without all the amazing open source work out there. In particular, this extension relies heavily on the amazing work of the team at intermock