diff --git a/lib/loading/ComponentsManagerBuilder.ts b/lib/loading/ComponentsManagerBuilder.ts index 6d84813..6542f8b 100644 --- a/lib/loading/ComponentsManagerBuilder.ts +++ b/lib/loading/ComponentsManagerBuilder.ts @@ -54,7 +54,7 @@ export class ComponentsManagerBuilder { Boolean(options.typeChecking); this.remoteContextLookups = options.remoteContextLookups === undefined ? false : - Boolean(options.typeChecking); + Boolean(options.remoteContextLookups); } public static createLogger(logLevel: LogLevel = 'warn'): Logger { diff --git a/test/unit/loading/ComponentsManagerBuilder-test.ts b/test/unit/loading/ComponentsManagerBuilder-test.ts index 55e147f..3b4774c 100644 --- a/test/unit/loading/ComponentsManagerBuilder-test.ts +++ b/test/unit/loading/ComponentsManagerBuilder-test.ts @@ -57,6 +57,16 @@ describe('ComponentsManagerBuilder', () => { jest.clearAllMocks(); }); + it('should honour remoteContextLookups independently of typeChecking', async() => { + const builder = new ComponentsManagerBuilder({ + mainModulePath, + remoteContextLookups: true, + typeChecking: false, + }); + const mgr = await builder.build(); + expect(( mgr.configRegistry).remoteContextLookups).toBe(true); + }); + it('should build with default options', async() => { const componentsManagerBuilder = new ComponentsManagerBuilder({ mainModulePath,