Skip to content

Commit d887fbd

Browse files
committed
fix tests
1 parent e627258 commit d887fbd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/unit/common/session.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ describe("Session", () => {
134134
await session.connectToMongoDB({
135135
connectionString: "mongodb://localhost:27017",
136136
});
137-
expect(await session.isSearchIndexSupported()).toEqual(true);
137+
expect(await session.isConnectedToMongot).toEqual(true);
138138
});
139139

140140
it("should return false if listing search indexes fail with search error", async () => {
141141
getSearchIndexesMock.mockRejectedValue(new Error("SearchNotEnabled"));
142142
await session.connectToMongoDB({
143143
connectionString: "mongodb://localhost:27017",
144144
});
145-
expect(await session.isSearchIndexSupported()).toEqual(false);
145+
expect(await session.isConnectedToMongot).toEqual(false);
146146
});
147147
});
148148
});

tests/unit/resources/common/debug.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe("debug resource", () => {
103103
});
104104

105105
it("should notify if a cluster supports search indexes", async () => {
106-
session.isSearchIndexSupported = vi.fn().mockResolvedValue(true);
106+
vi.spyOn(session, "isConnectedToMongot", "get").mockImplementation(() => Promise.resolve(true));
107107
debugResource.reduceApply("connect", undefined);
108108
const output = await debugResource.toOutput();
109109

0 commit comments

Comments
 (0)