Skip to content

Commit

Permalink
Check for release extension also in tests (#1790)
Browse files Browse the repository at this point in the history
  • Loading branch information
billti committed Jul 24, 2024
1 parent d62d88f commit 5763700
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions vscode/test/suites/extensionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ import { type ExtensionApi } from "../../src/extension";
const extensionLogLevel = "warn";

export async function activateExtension() {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const ext = vscode.extensions.getExtension("quantum.qsharp-lang-vscode-dev")!;
// Check for pre-release or stable builds of the extension, as could be in release pipeline
const ext =
vscode.extensions.getExtension("quantum.qsharp-lang-vscode-dev") ??
vscode.extensions.getExtension("quantum.qsharp-lang-vscode");

if (!ext) {
throw new Error("qsharp extension not found");
}

if (ext.isActive) {
return;
}
Expand Down

0 comments on commit 5763700

Please sign in to comment.