Skip to content

Commit

Permalink
fix test suite setup
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbastien committed Nov 27, 2024
1 parent e3abc99 commit 315d56a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/sourcekit-lsp/LanguageClientManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class LanguageClientManager implements vscode.Disposable {
// The language client stops asnyhronously, so we need to wait for it to stop
// instead of doing it in dispose, which must be synchronous.
async stop() {
if (this.languageClient && this.languageClient.state === langclient.State.Running) {
if (this.languageClient && this.languageClient.state === State.Running) {
await this.languageClient.dispose();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as vscode from "vscode";
import contextKeys from "../../../src/contextKeys";
import { expect } from "chai";
import { folderContextPromise, globalWorkspaceContextPromise } from "../extension.test";
import { activateExtensionForSuite, folderInRootWorkspace } from "../utilities/testutilities";
import { waitForNoRunningTasks } from "../../utilities";
import { testAssetUri } from "../../fixtures";
import { FolderContext } from "../../../src/FolderContext";
Expand All @@ -32,11 +32,13 @@ suite("Documentation Preview", function () {
let folderContext: FolderContext;
let workspaceContext: WorkspaceContext;

suiteSetup(async function () {
workspaceContext = await globalWorkspaceContextPromise;
await waitForNoRunningTasks();
folderContext = await folderContextPromise("SlothCreatorExample");
await workspaceContext.focusFolder(folderContext);
activateExtensionForSuite({
async setup(ctx) {
workspaceContext = ctx;
await waitForNoRunningTasks();
folderContext = await folderInRootWorkspace("SlothCreatorExample", ctx);
await ctx.focusFolder(folderContext);
},
});

suiteTeardown(async () => {
Expand Down

0 comments on commit 315d56a

Please sign in to comment.