Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/loading/ComponentsManagerBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class ComponentsManagerBuilder<TInstance = any> {
Boolean(options.typeChecking);
this.remoteContextLookups = options.remoteContextLookups === undefined ?
false :
Boolean(options.typeChecking);
Boolean(options.remoteContextLookups);
}

public static createLogger(logLevel: LogLevel = 'warn'): Logger {
Expand Down
10 changes: 10 additions & 0 deletions test/unit/loading/ComponentsManagerBuilder-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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((<any> mgr.configRegistry).remoteContextLookups).toBe(true);
});

it('should build with default options', async() => {
const componentsManagerBuilder = new ComponentsManagerBuilder({
mainModulePath,
Expand Down
Loading