Skip to content

Commit 305c353

Browse files
committed
chore: add more mode: form
1 parent 7ebf7f1 commit 305c353

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

tests/integration/elicitation.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe("Elicitation Integration Tests", () => {
3838
expect(mockElicitInput.mock).toHaveBeenCalledWith({
3939
message: expect.stringContaining("You are about to drop the `test-db` database"),
4040
requestedSchema: Elicitation.CONFIRMATION_SCHEMA,
41+
mode: "form",
4142
});
4243

4344
// Should attempt to execute (will fail due to no connection, but confirms flow worked)
@@ -82,6 +83,7 @@ describe("Elicitation Integration Tests", () => {
8283
expect(mockElicitInput.mock).toHaveBeenCalledWith({
8384
message: expect.stringContaining("You are about to drop the `test-collection` collection"),
8485
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
86+
mode: "form",
8587
});
8688
});
8789

@@ -101,6 +103,7 @@ describe("Elicitation Integration Tests", () => {
101103
expect(mockElicitInput.mock).toHaveBeenCalledWith({
102104
message: expect.stringContaining("You are about to delete documents"),
103105
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
106+
mode: "form",
104107
});
105108
});
106109

@@ -120,6 +123,7 @@ describe("Elicitation Integration Tests", () => {
120123
expect(mockElicitInput.mock).toHaveBeenCalledWith({
121124
message: expect.stringContaining("You are about to create a database user"),
122125
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
126+
mode: "form",
123127
});
124128
});
125129

@@ -140,6 +144,7 @@ describe("Elicitation Integration Tests", () => {
140144
"You are about to add the following entries to the access list"
141145
),
142146
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
147+
mode: "form",
143148
});
144149
});
145150
});
@@ -222,6 +227,7 @@ describe("Elicitation Integration Tests", () => {
222227
/You are about to execute the `list-databases` tool which requires additional confirmation. Would you like to proceed\?/
223228
),
224229
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
230+
mode: "form",
225231
});
226232
});
227233

@@ -265,6 +271,7 @@ describe("Elicitation Integration Tests", () => {
265271
expect(mockElicitInput.mock).toHaveBeenCalledWith({
266272
message: expect.stringMatching(/project.*507f1f77bcf86cd799439011/),
267273
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
274+
mode: "form",
268275
});
269276
});
270277

@@ -283,6 +290,7 @@ describe("Elicitation Integration Tests", () => {
283290
expect(mockElicitInput.mock).toHaveBeenCalledWith({
284291
message: expect.stringMatching(/mydb.*database/),
285292
requestedSchema: expect.objectContaining(Elicitation.CONFIRMATION_SCHEMA),
293+
mode: "form",
286294
});
287295
});
288296
},

tests/integration/tools/mongodb/delete/dropIndex.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
476476
message: expect.stringContaining(
477477
"You are about to drop the search index named `searchIdx` from the `mflix.movies` namespace"
478478
),
479+
mode: "form",
479480
requestedSchema: Elicitation.CONFIRMATION_SCHEMA,
480481
});
481482

@@ -503,6 +504,7 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
503504
message: expect.stringContaining(
504505
"You are about to drop the search index named `searchIdx` from the `mflix.movies` namespace"
505506
),
507+
mode: "form",
506508
requestedSchema: Elicitation.CONFIRMATION_SCHEMA,
507509
});
508510
expect(dropSearchIndexSpy).not.toHaveBeenCalled();

tests/unit/elicitation.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe("Elicitation", () => {
8282
expect(mockElicitInput.mock).toHaveBeenCalledWith({
8383
message: testMessage,
8484
requestedSchema: Elicitation.CONFIRMATION_SCHEMA,
85+
mode: "form",
8586
});
8687
});
8788

0 commit comments

Comments
 (0)