diff --git a/.continue/prompts/core-util-test.prompt b/.continue/prompts/core-util-test.prompt index 2a3ca399e..6cc7351a2 100644 --- a/.continue/prompts/core-util-test.prompt +++ b/.continue/prompts/core-util-test.prompt @@ -13,7 +13,7 @@ Use given types to generate mock data if needed. Additional types can be imported from @core/index.d.ts If any needed type declaration is still not found, warn the user. -Existing test fixtures can be found in @core/test/util/fixtures.ts +Existing test fixtures can be found in @core/test/fixtures.ts - import and use `testIde` for any IDE type needs - import and use `testControlPlaneClient` for any ControlPlaneClient needs - import and use `testConfigHandler` for any ConfigHandler needs diff --git a/core/autocomplete/context/root-path-context/test/testUtils.ts b/core/autocomplete/context/root-path-context/test/testUtils.ts index 7a5c22aba..207b1d6d4 100644 --- a/core/autocomplete/context/root-path-context/test/testUtils.ts +++ b/core/autocomplete/context/root-path-context/test/testUtils.ts @@ -4,7 +4,7 @@ import path from "path"; import Parser from "web-tree-sitter"; import { Position } from "../../../.."; -import { testIde } from "../../../../test/util/fixtures"; +import { testIde } from "../../../../test/fixtures"; import { getAst, getTreePathAtCursor } from "../../../util/ast"; import { ImportDefinitionsService } from "../../ImportDefinitionsService"; import { RootPathContextService } from "../RootPathContextService"; diff --git a/core/autocomplete/filtering/test/filter.test.ts b/core/autocomplete/filtering/test/filter.test.ts index e6c07b951..594e061ad 100644 --- a/core/autocomplete/filtering/test/filter.test.ts +++ b/core/autocomplete/filtering/test/filter.test.ts @@ -1,4 +1,4 @@ -import { setUpTestDir, tearDownTestDir } from "../../../test/util/testDir"; +import { setUpTestDir, tearDownTestDir } from "../../../test/testDir"; import { TEST_CASES_WITH_DIFF, TEST_CASES_WITHOUT_DIFF } from "./testCases"; import { diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index 8adaa101a..a052aace2 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import Mock from "../../../llm/llms/Mock"; -import { testConfigHandler, testIde } from "../../../test/util/fixtures"; +import { testConfigHandler, testIde } from "../../../test/fixtures"; import { CompletionProvider } from "../../CompletionProvider"; import { AutocompleteInput } from "../../util/types"; diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index 26de42ec7..e7d90f492 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -1,8 +1,8 @@ import fs from "node:fs"; import path from "node:path"; -import { testConfigHandler } from "../test/util/fixtures"; -import { TEST_DIR } from "../test/util/testDir"; +import { testConfigHandler } from "../test/fixtures"; +import { TEST_DIR } from "../test/testDir"; import { getConfigTsPath } from "../util/paths"; import { defaultConfig } from "./default"; diff --git a/core/context/providers/_context-providers.test.ts b/core/context/providers/_context-providers.test.ts index 2603a2d85..7e0fdbd73 100644 --- a/core/context/providers/_context-providers.test.ts +++ b/core/context/providers/_context-providers.test.ts @@ -9,7 +9,7 @@ import { ConfigHandler } from "../../config/ConfigHandler"; import { contextProviderClassFromName } from "."; import { ControlPlaneClient } from "../../control-plane/client"; import FileSystemIde from "../../util/filesystem"; -import { TEST_DIR } from "../../test/util/testDir"; +import { TEST_DIR } from "../../test/testDir"; const CONTEXT_PROVIDERS_TO_TEST: ContextProviderWithParams[] = [ { name: "diff", params: {} }, diff --git a/core/indexing/CodeSnippetsIndex.test.ts b/core/indexing/CodeSnippetsIndex.test.ts index c77f9903d..814927725 100644 --- a/core/indexing/CodeSnippetsIndex.test.ts +++ b/core/indexing/CodeSnippetsIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../test/util/fixtures"; +import { testIde } from "../test/fixtures"; import { insertMockChunks, mockPathAndCacheKey, diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 483c178a0..950e23ffd 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -5,13 +5,13 @@ import path from "node:path"; import { jest } from "@jest/globals"; import { ContinueServerClient } from "../continueServer/stubs/client.js"; -import { testConfigHandler, testIde } from "../test/util/fixtures.js"; +import { testConfigHandler, testIde } from "../test/fixtures.js"; import { addToTestDir, setUpTestDir, tearDownTestDir, TEST_DIR, -} from "../test/util/testDir.js"; +} from "../test/testDir.js"; import { getIndexSqlitePath } from "../util/paths.js"; import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js"; diff --git a/core/indexing/LanceDbIndex.test.ts b/core/indexing/LanceDbIndex.test.ts index c3584f3db..1d15117fd 100644 --- a/core/indexing/LanceDbIndex.test.ts +++ b/core/indexing/LanceDbIndex.test.ts @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; import lance from "vectordb"; -import { testConfigHandler, testIde } from "../test/util/fixtures"; +import { testConfigHandler, testIde } from "../test/fixtures"; import { mockPathAndCacheKey, mockTag, diff --git a/core/indexing/chunk/ChunkCodebaseIndex.test.ts b/core/indexing/chunk/ChunkCodebaseIndex.test.ts index 7b233663a..3f7904991 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.test.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../../test/util/fixtures"; +import { testIde } from "../../test/fixtures"; import { mockFileContents, mockFilename, @@ -8,7 +8,7 @@ import { testContinueServerClient, updateIndexAndAwaitGenerator, } from "../test/indexing"; -import { addToTestDir } from "../../test/util/testDir"; +import { addToTestDir } from "../../test/testDir"; import { DatabaseConnection, SqliteDb } from "../refreshIndex"; import { IndexResultType } from "../types"; diff --git a/core/indexing/docs/DocsCrawler.skip.ts b/core/indexing/docs/DocsCrawler.skip.ts index 57d712fed..97226c296 100644 --- a/core/indexing/docs/DocsCrawler.skip.ts +++ b/core/indexing/docs/DocsCrawler.skip.ts @@ -3,7 +3,7 @@ import os from "os"; import { jest } from "@jest/globals"; import { ContinueConfig } from "../.."; -import { testConfigHandler } from "../../test/util/fixtures"; +import { testConfigHandler } from "../../test/fixtures"; import FileSystemIde from "../../util/filesystem"; import DocsCrawler, { ChromiumInstaller, type PageData } from "./DocsCrawler"; diff --git a/core/indexing/test/indexing.ts b/core/indexing/test/indexing.ts index 1506231ec..413c37e75 100644 --- a/core/indexing/test/indexing.ts +++ b/core/indexing/test/indexing.ts @@ -6,8 +6,8 @@ import { ChunkCodebaseIndex } from "../chunk/ChunkCodebaseIndex"; import { tagToString } from "../refreshIndex"; import { CodebaseIndex, PathAndCacheKey, RefreshIndexResults } from "../types"; -import { testIde } from "../../test/util/fixtures"; -import { addToTestDir, TEST_DIR } from "../../test/util/testDir"; +import { testIde } from "../../test/fixtures"; +import { addToTestDir, TEST_DIR } from "../../test/testDir"; export const mockFilename = "test.py"; export const mockPathAndCacheKey = { diff --git a/core/indexing/walkDir.test.ts b/core/indexing/walkDir.test.ts index 748e958e9..25ffdfc37 100644 --- a/core/indexing/walkDir.test.ts +++ b/core/indexing/walkDir.test.ts @@ -6,7 +6,7 @@ import { setUpTestDir, tearDownTestDir, addToTestDir, -} from "../test/util/testDir"; +} from "../test/testDir"; import FileSystemIde from "../util/filesystem"; const ide = new FileSystemIde(TEST_DIR); diff --git a/core/package.json b/core/package.json index c18847ecf..b02671dba 100644 --- a/core/package.json +++ b/core/package.json @@ -59,7 +59,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/core/test/util/fixtures.ts b/core/test/fixtures.ts similarity index 68% rename from core/test/util/fixtures.ts rename to core/test/fixtures.ts index e0aa06d14..add71d029 100644 --- a/core/test/util/fixtures.ts +++ b/core/test/fixtures.ts @@ -1,6 +1,6 @@ -import { ConfigHandler } from "../../config/ConfigHandler"; -import { ControlPlaneClient } from "../../control-plane/client"; -import FileSystemIde from "../../util/filesystem"; +import { ConfigHandler } from "../config/ConfigHandler"; +import { ControlPlaneClient } from "../control-plane/client"; +import FileSystemIde from "../util/filesystem"; import { TEST_DIR } from "./testDir"; diff --git a/core/test/util/testDir.ts b/core/test/testDir.ts similarity index 100% rename from core/test/util/testDir.ts rename to core/test/testDir.ts