Typescript-TDD / ts-auto-mock

Typescript transformer to unlock automatic mock creation for interfaces and classes
https://typescript-tdd.github.io/ts-auto-mock
MIT License
600 stars 16 forks source link
automatic fake mock mocking testing typescript typescript-transformer

TS auto mock

Test npm version Downloads semantic-release Commitizen friendly GitHub Sponsor

All Contributors

Slack Need help? Join us on Slack

:warning: This repository is now no longer maintained for new features development :warning:

A few years ago we've created this project with the idea in mind that typescript transformers would be easier to configure.

Unfortunately the typescript team has no intention to improve the developer experience. You can see more information at this link.

We believe that stop developing new features is the best decision to inform who is currently using it and who find it for the first time.

We will keep fixing bugs and vulnerability.

Other reasons why this library might not be for you:

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!

Sponsor ✨

Thanks to these people


Kenta Mukai

License

This project is licensed under the MIT License