Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ import { tmpDir } from "../../../src/tmp-dir";
import { readFile, writeFile, ensureDir, copy } from "fs-extra";
import { createVSCodeCommandManager } from "../../../src/common/vscode/commands";
import type { AllCommands } from "../../../src/common/commands";
import { getActivatedExtension } from "../global.helper";

/**
* Integration tests for queries
*/
describe("SourceMap", () => {
const commandManager = createVSCodeCommandManager<AllCommands>();

beforeEach(async () => {
// Ensure that the extension is fully activated before running tests. This is important
// because the extension activate() function ensures that the language server is up and
// running before returning, so that we don't get "Client is not running" test flakes.
await getActivatedExtension();
});
Comment on lines +15 to +20
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suite already activates the CodeQL extension via the CLI integration Jest setup (extensions/ql-vscode/test/vscode-tests/cli-integration/jest.setup.ts calls beforeAllAction(), which calls getActivatedExtension() in jest.activated-extension.setup.ts). Adding another getActivatedExtension() here is therefore redundant and can be misleading when diagnosing the flake. Consider removing this hook, switching it to beforeAll, or moving any required readiness/wait logic into the shared setup so all tests benefit consistently.

Copilot uses AI. Check for mistakes.

it("should jump to QL code", async () => {
const root = workspace.workspaceFolders![0].uri.fsPath;
const srcFiles = {
Expand Down
Loading