TS auto mock
Need help? Join us on Slack
A TypeScript transformer that will allow you to create mocks for any types (interfaces, classes, etc.) without the need to create manual fakes/mocks.
API Documentation
Installation
Usage
Quick overview
import { createMock } from 'ts-auto-mock';
interface Person {
id: string;
getName(): string;
details: {
phone: number
}
}
const mock = createMock<Person>();
mock.id // ""
mock.getName() // ""
mock.details // "{ phone: 0 }"- If you are interested to use it with jasmine please go to jasmine-ts-auto-mock
- If you are interested to use it with jest please go to jest-ts-auto-mock
Changelog
Find the changelog here: Changelog.
Roadmap
You can find the roadmap of this project on the Wiki page: Roadmap.
Do you want to contribute?
Authors
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Geoffrey 'C0ZEN' Testelin |
Giulio Caprino |
Vittorio Guerriero |
This project follows the all-contributors specification. Contributions of any kind welcome!
License
This project is licensed under the MIT License.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
