@nexus-ioc/testing
v0.4.2
Published
Testing helpers for Nexus IoC library
Downloads
17
Readme
Test library for Nexus IoC
Table of Contents
Installation
npm install @nexus-ioc/core @nexus-ioc/testing
Quick Start
import { Injectable } from '@nexus-ioc/core';
import { Test } from '@nexus-ioc/testing';
describe('AppModule', () => {
it('should create instance', async () => {
@Injectable()
class AppService {}
const appModule = await Test.createModule({
providers: [AppService],
}).compile();
const appService = await appModule.get<AppService>(AppService);
expect(appService).toBeInstanceOf(AppService);
});
});
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Isqanderm (Aleksandr Melnik) - LinkedIn
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Acknowledgements
Special thanks to the developers of Angular and NestJS for the inspiration.
Wiki
For more detailed documentation, please visit the Wiki.