Nectar of the Programming Masses

    ts-auto-mock
    TypeScript icon, indicating that this package has built-in type declarations

    3.5.0 • Public • Published

    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.

    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

    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.

    Install

    npm i ts-auto-mock

    DownloadsWeekly Downloads

    19,439

    Version

    3.5.0

    License

    MIT

    Unpacked Size

    234 kB

    Total Files

    146

    Last publish

    Collaborators

    • uittorio
    • pmyl