mirror of
https://github.com/nestjs/nest.git
synced 2026-10-28 09:45:43 +08:00
17 lines
681 B
TypeScript
17 lines
681 B
TypeScript
import { expect } from 'chai';
|
|
import { Test } from '@nestjs/testing';
|
|
import { CircularModule } from '../src/circular-structure-dynamic-module/circular.module.js';
|
|
import { InputService } from '../src/circular-structure-dynamic-module/input.service.js';
|
|
|
|
describe('Circular structure for dynamic modules', () => {
|
|
it('should resolve circular structure with dynamic modules', async () => {
|
|
const builder = Test.createTestingModule({
|
|
imports: [CircularModule.forRoot()],
|
|
});
|
|
const testingModule = await builder.compile();
|
|
const inputService = testingModule.get<InputService>(InputService);
|
|
|
|
expect(inputService).to.be.instanceof(InputService);
|
|
});
|
|
});
|