Skip to content

Typescript transformer to unlock automatic mock creation for interfaces and classes

License

Notifications You must be signed in to change notification settings

martinjlowm/ts-auto-mock

 
 

Repository files navigation

Ts Auto Mock

Test npm version Downloads

slack 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.

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} "

Authors

License

This project is licensed under the MIT License

About

Typescript transformer to unlock automatic mock creation for interfaces and classes

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.1%
  • JavaScript 10.8%
  • CSS 1.1%