Skip to content

Commit

Permalink
Add index.spec.ts and schema/index.ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuaki640 committed Mar 5, 2024
1 parent e52b735 commit f0c477d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tests/index.spec.ts → src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { DrizzleD1Database } from "drizzle-orm/d1";
import { beforeEach, describe, expect, it, vi } from "vitest";
import app from "../index";
import app from "./index";
import {
getMessagesByRoomId,
insertMessage,
} from "../repositories/message-repository";
} from "./repositories/message-repository";
import {
getAllRooms,
getRoom,
insertRoom,
} from "../repositories/room-repository";
import { fetchCompletion } from "../utils/openai-client";
} from "./repositories/room-repository";
import { fetchCompletion } from "./utils/openai-client";

const MOCK_BINDINGS = {
USERNAME: "test",
Expand All @@ -34,7 +34,7 @@ const { mockFetchCompletion } = vi.hoisted(() => ({
choices: [{ message: { content: "test" } }],
}),
}));
vi.mock("../utils/openai-client", () => ({
vi.mock("./utils/openai-client", () => ({
fetchCompletion: mockFetchCompletion,
}));

Expand Down Expand Up @@ -68,7 +68,7 @@ const { mockInsertRoom, mockGetRoom, mockGetAllRooms } = vi.hoisted(() => ({
},
]),
}));
vi.mock("../repositories/room-repository", () => ({
vi.mock("./repositories/room-repository", () => ({
insertRoom: mockInsertRoom,
getRoom: mockGetRoom,
getAllRooms: mockGetAllRooms,
Expand All @@ -94,7 +94,7 @@ const { mockGetMessagesByRoomId, mockInsertMessage } = vi.hoisted(() => ({
ReturnType<typeof insertMessage>
>(),
}));
vi.mock("../repositories/message-repository", () => ({
vi.mock("./repositories/message-repository", () => ({
getMessagesByRoomId: mockGetMessagesByRoomId,
insertMessage: mockInsertMessage,
}));
Expand Down
File renamed without changes.

0 comments on commit f0c477d

Please sign in to comment.