Miss any of our Open RFC calls?Watch the recordings here! »

ts-auto-mock

2.2.6 • Public • Published

Ts Auto Mock

Test npm version Downloads semantic-release Commitizen friendly

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.

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

Changelog

Roadmap

Do you want to contribute?

Authors

License

This project is licensed under the MIT License

Install

npm i ts-auto-mock

DownloadsWeekly Downloads

9,709

Version

2.2.6

License

MIT

Unpacked Size

213 kB

Total Files

125

Last publish

Collaborators

  • avatar
  • avatar