Need help? Join us on Slack
A Typescript transformer that will allow you to create mock for any types (Interfaces, Classes, ...) without need to create manual fakes/mocks.
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
This project is licensed under the MIT License