Move debugger tests into subdirectory
This commit is contained in:
@@ -7,19 +7,20 @@ import {
|
||||
debug,
|
||||
workspace,
|
||||
} from "vscode";
|
||||
import * as CodeQLProtocol from "../../../src/debugger/debug-protocol";
|
||||
import { DisposableObject } from "../../../src/pure/disposable-object";
|
||||
import { QueryResultType } from "../../../src/pure/legacy-messages";
|
||||
import { CoreCompletedQuery } from "../../../src/queryRunner";
|
||||
import { QueryOutputDir } from "../../../src/run-queries-shared";
|
||||
import * as CodeQLProtocol from "../../../../src/debugger/debug-protocol";
|
||||
import { DisposableObject } from "../../../../src/pure/disposable-object";
|
||||
import { QueryResultType } from "../../../../src/pure/legacy-messages";
|
||||
import { CoreCompletedQuery } from "../../../../src/queryRunner";
|
||||
import { QueryOutputDir } from "../../../../src/run-queries-shared";
|
||||
import {
|
||||
QLDebugArgs,
|
||||
QLDebugConfiguration,
|
||||
} from "../../../src/debugger/debug-configuration";
|
||||
} from "../../../../src/debugger/debug-configuration";
|
||||
import { join } from "path";
|
||||
import { writeFile } from "fs-extra";
|
||||
import { expect } from "@jest/globals";
|
||||
import { AppCommandManager } from "../../../src/common/commands";
|
||||
import { AppCommandManager } from "../../../../src/common/commands";
|
||||
import { getOnDiskWorkspaceFolders } from "../../../../src/helpers";
|
||||
|
||||
type Resolver<T> = (value: T) => void;
|
||||
|
||||
@@ -211,7 +212,7 @@ export class DebugController
|
||||
|
||||
public async createLaunchJson(config: QLDebugConfiguration): Promise<void> {
|
||||
const launchJsonPath = join(
|
||||
getOnDiskWorkspaceFolders()[0],
|
||||
getOnDiskWorkspaceFolders()[0],
|
||||
".vscode/launch.json",
|
||||
);
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { Selection, Uri, window, workspace } from "vscode";
|
||||
import { join } from "path";
|
||||
|
||||
import { DatabaseManager } from "../../../src/local-databases";
|
||||
import { DatabaseManager } from "../../../../src/local-databases";
|
||||
import {
|
||||
cleanDatabases,
|
||||
ensureTestDatabase,
|
||||
getActivatedExtension,
|
||||
} from "../global.helper";
|
||||
import { describeWithCodeQL } from "../cli";
|
||||
} from "../../global.helper";
|
||||
import { describeWithCodeQL } from "../../cli";
|
||||
import { withDebugController } from "./debug-controller";
|
||||
import { CodeQLCliServer } from "../../../src/cli";
|
||||
import { QueryOutputDir } from "../../../src/run-queries-shared";
|
||||
import { createVSCodeCommandManager } from "../../../src/common/vscode/commands";
|
||||
import { AllCommands } from "../../../src/common/commands";
|
||||
import { CodeQLCliServer } from "../../../../src/cli";
|
||||
import { QueryOutputDir } from "../../../../src/run-queries-shared";
|
||||
import { createVSCodeCommandManager } from "../../../../src/common/vscode/commands";
|
||||
import { AllCommands } from "../../../../src/common/commands";
|
||||
|
||||
jest.setTimeout(30_000);
|
||||
|
||||
@@ -44,9 +44,9 @@ describeWithCodeQL()("Debugger", () => {
|
||||
let databaseManager: DatabaseManager;
|
||||
let cli: CodeQLCliServer;
|
||||
const appCommands = createVSCodeCommandManager<AllCommands>();
|
||||
const simpleQueryPath = join(__dirname, "data", "simple-query.ql");
|
||||
const quickEvalQueryPath = join(__dirname, "data", "QuickEvalQuery.ql");
|
||||
const quickEvalLibPath = join(__dirname, "data", "QuickEvalLib.qll");
|
||||
const simpleQueryPath = join(__dirname, "..", "data", "simple-query.ql");
|
||||
const quickEvalQueryPath = join(__dirname, "..", "data", "QuickEvalQuery.ql");
|
||||
const quickEvalLibPath = join(__dirname, "..", "data", "QuickEvalLib.qll");
|
||||
|
||||
beforeEach(async () => {
|
||||
const extension = await getActivatedExtension();
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
QueryServerCommands,
|
||||
} from "../../../src/common/commands";
|
||||
import { ProgressCallback } from "../../../src/progress";
|
||||
import { withDebugController } from "./debug-controller";
|
||||
import { withDebugController } from "./debugger/debug-controller";
|
||||
|
||||
type DebugMode = "localQueries" | "debug";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user