sirclo-solution / ts-auto-mock

Typescript transformer to unlock automatic mock creation for interfaces and classes

Home Page:https://typescript-tdd.github.io/ts-auto-mock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS auto mock

Test npm version Downloads semantic-release Commitizen friendly

All Contributors

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

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

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):


Artem Kornev

πŸ› πŸ’»

Fabian

πŸ› πŸ’»

Geoffrey 'C0ZEN' Testelin

πŸ› πŸ’» πŸ€” πŸ”§

Giulio Caprino

πŸ’¬ πŸ’» πŸ“– πŸ€” πŸš‡ 🚧 πŸ“†

Marc

πŸ› πŸ’»

Martin Jesper Low Madsen

πŸ› πŸ’» πŸ€”

Vittorio Guerriero

πŸ’¬ πŸ’» πŸ€” πŸš‡ 🚧 πŸ“† πŸ”§

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This project is licensed under the MIT License.

About

Typescript transformer to unlock automatic mock creation for interfaces and classes

https://typescript-tdd.github.io/ts-auto-mock

License:MIT License


Languages

Language:TypeScript 91.1%Language:JavaScript 8.0%Language:SCSS 0.9%Language:Shell 0.0%