Skip to content

Commit d2d5c4d

Browse files
authored
Move test files to colocate (#3584)
1 parent 74ec854 commit d2d5c4d

65 files changed

Lines changed: 65 additions & 60 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/__tests__/README.md

Lines changed: 7 additions & 2 deletions
File renamed without changes.

src/__tests__/selectionCommentButtonPosition.test.ts renamed to src/components/preview_panel/plan/selectionCommentButtonPosition.test.ts

File renamed without changes.
File renamed without changes.

src/__tests__/chat_stream_handlers.test.ts renamed to src/ipc/handlers/chat_stream_handlers.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import {
55
getDyadRenameTags,
66
getDyadAddDependencyTags,
77
getDyadDeleteTags,
8-
} from "../ipc/utils/dyad_tag_parser";
8+
} from "@/ipc/utils/dyad_tag_parser";
99

10-
import { processFullResponseActions } from "../ipc/processors/response_processor";
10+
import { processFullResponseActions } from "@/ipc/processors/response_processor";
1111
import {
1212
removeDyadTags,
1313
hasUnclosedDyadWrite,
14-
} from "../ipc/handlers/chat_stream_handlers";
14+
} from "@/ipc/handlers/chat_stream_handlers";
1515
import fs from "node:fs";
16-
import { db } from "../db";
17-
import { cleanFullResponse } from "../ipc/utils/cleanFullResponse";
18-
import { gitAdd, gitRemove, gitCommit } from "../ipc/utils/git_utils";
16+
import { db } from "@/db";
17+
import { cleanFullResponse } from "@/ipc/utils/cleanFullResponse";
18+
import { gitAdd, gitRemove, gitCommit } from "@/ipc/utils/git_utils";
1919
import { DyadError, DyadErrorKind } from "@/errors/dyad_error";
2020

2121
// Mock fs with default export
@@ -45,7 +45,7 @@ vi.mock("node:fs", async () => {
4545
});
4646

4747
// Mock Git utils
48-
vi.mock("../ipc/utils/git_utils", () => ({
48+
vi.mock("@/ipc/utils/git_utils", () => ({
4949
gitAdd: vi.fn(),
5050
gitCommit: vi.fn(),
5151
gitRemove: vi.fn(),
@@ -61,15 +61,15 @@ vi.mock("../ipc/utils/git_utils", () => ({
6161
}));
6262

6363
// Mock paths module to control getDyadAppPath
64-
vi.mock("../paths/paths", () => ({
64+
vi.mock("@/paths/paths", () => ({
6565
getDyadAppPath: vi.fn().mockImplementation((appPath) => {
6666
return `/mock/user/data/path/${appPath}`;
6767
}),
6868
getUserDataPath: vi.fn().mockReturnValue("/mock/user/data/path"),
6969
}));
7070

7171
// Mock db
72-
vi.mock("../db", () => ({
72+
vi.mock("@/db", () => ({
7373
db: {
7474
query: {
7575
chats: {

src/__tests__/compaction_storage.test.ts renamed to src/ipc/handlers/compaction/compaction_storage.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
formatAsTranscript,
55
TOOL_RESULT_TRUNCATION_LIMIT,
66
type CompactionMessage,
7-
} from "../ipc/handlers/compaction/compaction_storage";
7+
} from "@/ipc/handlers/compaction/compaction_storage";
88

99
describe("transformToolTags", () => {
1010
it("passes through content without tool tags unchanged", () => {

0 commit comments

Comments
 (0)