Skip to content

Commit

Permalink
Fix diagnostics tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Feb 24, 2024
1 parent 3cc80d5 commit 7713b97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('Diagnostics', () => {
editorExtensionRegistry: env.editorExtensionRegistry,
themeManager: null
});
env.featureManager.register(feature);
await env.init();
});
afterEach(() => {
Expand Down Expand Up @@ -222,6 +223,7 @@ describe('Diagnostics', () => {
editorExtensionRegistry: env.editorExtensionRegistry,
themeManager: null
});
env.featureManager.register(feature);
await env.init();
});
afterEach(() => {
Expand Down
7 changes: 5 additions & 2 deletions packages/jupyterlab-lsp/src/testutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
DocumentConnectionManager,
FeatureManager,
ISocketConnectionOptions,
ILSPOptions
ILSPOptions,
ILSPFeatureManager
} from '@jupyterlab/lsp';
import { LSPConnection } from '@jupyterlab/lsp/lib/connection';
import * as nbformat from '@jupyterlab/nbformat';
Expand Down Expand Up @@ -200,6 +201,7 @@ export abstract class TestEnvironment implements ITestEnvironment {
documentOptions: VirtualDocument.IOptions;
editorExtensionRegistry: EditorExtensionRegistry;
editorServices: IEditorServices;
featureManager: ILSPFeatureManager;

constructor(protected options?: TestEnvironment.IOptions) {
this.editorExtensionRegistry = new EditorExtensionRegistry();
Expand Down Expand Up @@ -230,6 +232,7 @@ export abstract class TestEnvironment implements ITestEnvironment {
...this.getDefaults(),
...(options?.document || {})
};
this.featureManager = new FeatureManager();
}

protected abstract createWidget(): IDocumentWidget;
Expand Down Expand Up @@ -280,7 +283,7 @@ export abstract class TestEnvironment implements ITestEnvironment {
docRegistry,
connectionManager: this.connectionManager,
codeOverridesManager: overridesManager,
featureManager: new FeatureManager(),
featureManager: this.featureManager,
foreignCodeExtractorsManager: foreignCodeExtractors,
translator: nullTranslator
});
Expand Down

0 comments on commit 7713b97

Please sign in to comment.