Installation
Quick Install​
To fully integrate Automock into your testing and dependency injection frameworks, you'll need to install two packages: the Automock package for your chosen testing framework and the corresponding DI framework adapter.
For Jest:
- npm
- Yarn
- pnpm
$ npm i -D @automock/jest
$ yarn add --dev @automock/jest
$ pnpm add -D @automock/jest
For Sinon:
- npm
- Yarn
- pnpm
$ npm i -D @automock/sinon
$ yarn add --dev @automock/sinon
$ pnpm add -D @automock/sinon
And for your DI framework, choose the appropriate Automock adapter:
- NestJS
- InversifyJS
$ npm i -D @automock/adapters.nestjs
$ npm i -D @automock/adapters.inversify
DI Framework Adapter | Jest (@automock/jest ) | Sinon (@automock/sinon ) |
---|---|---|
NestJS Adapter (@automock/adapters.nestjs ) | ✅ | ✅ |
Inversify Adapter (@automock/adapters.inversify ) | ✅ (Beta) | ✅ (Beta) |
Seamless Integration with Different DI Frameworks​
Automock extends its capabilities to integrate with various dependency injection frameworks, such as NestJS and InversifyJS, among others. Detailed insights into Automock's adaptability across frameworks are provided on our dedicated Adapters page.