-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Aleksandr Melnik edited this page Oct 18, 2024
·
3 revisions
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);
});
});