Automock

Automock

Easy Unit Tests for TypeScript

16 followers

Automock is a free and open-source solution for managing unit testing in TypeScript DI environments. It creates mocks for dependencies automatically, which speeds up the testing process. It is compatible with the NestJS and InversifyJS frameworks and supports Jest and Sinon. This frees up developers' time to focus on creating more effective test suites without having to worry about manual mock setups, improving overall testing productivity and quality.
Automock gallery image
Automock gallery image
Free
Launch Team
AssemblyAI
AssemblyAI
Build voice AI apps with a single API
Promoted

What do you think? …

Omer Morad
Maker
📌
Hello, Automock's creator here. Manual mocking for unit tests in dependency injection (DI) frameworks has taken up a lot of my time since I started using TypeScript. Monotony can lead to complex, hard-to-manage test suites. That's why I created Automock. This tool aimed at changing how devs approach unit testing in DI. The idea is to make the process more efficient by automating the generation of mock objects for classes inside these frameworks while maintaining a consistent syntax and test structure. Key Automock features: - Automatic Mock Generation - Consistent Test Structure - Tests suites will follow a consistent syntax and structure. - Supports NestJS and InversifyJS, and plan to add TSryinge, TypeDI, and Ts.ED. - Works well with Jest and Sinon, fitting into various testing workflows. Vitest is the next. The cool part about Automock is that it creates a virtual DI container. This bypasses the usual DI framework testing mechanisms, speeding up test execution and removing the need to load the actual DI container.
Arnob khulkarni
Congratulations on the launch 🎉 Best of luck @omer_morad launch 🔥🔥
Omer Morad
@hasib_mia Thank you very much :)
Mahsima Dastan
congrats. starred on GitHub
Omer Morad
@mahsimadastan Thanks you!
Harish Roufe
I am intrigued by how it expedites the testing procedure. Could you please elaborate on that?
Omer Morad
Automock automates dependency mocks to speed up testing. TypeScript projects, especially those using NestJS, spend a lot of time manually setting up mocks for each dependent. Automating mocks based on your test's classes and services with Automock avoids this. This automation lets you focus on test logic rather than dummy code. It also reduces manual mock setup errors. Additionally, Automock's virtual DI container effortlessly integrates these mocks, speeding the process. The documentation and GitHub repository explain how Automock generates and integrates mocks, you can also refer to the docs website at https://automock.dev :)
Harish Roufe
@omer_morad going to check. Thanks
Sarah Metzler
In what specific ways does TestBed simplify unit test setup?
Omer Morad
@sarah_metzler It creates mocks automatically, and bypass the conventional DI container. You can see more on the docs website https://automock.dev
Gerardo Fowler
Automock has been dependable and stable when used with InversifyJS. Fantastic work on this tool
Omer Morad
@gerardo_fowler Glad to hear!! Thanks :)
Patricia Conklin
Does using Automock for TypeScript unit tests affect the debugging process in any way?
Omer Morad
@patricia_conklin Not in an any special way, debugging is the same like any other test