You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/__tests__/__snapshots__/server.toolsHost.test.ts.snap
+86Lines changed: 86 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,74 @@ exports[`requestHello should send hello:ack message, with valid request 1`] = `
190
190
]
191
191
`;
192
192
193
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return a DOMException-like object, with name, message and multiline line stack 1`] =`
194
+
{
195
+
"error": "Internal error",
196
+
"id": "request-id",
197
+
"ok": false,
198
+
"t": "invoke:result",
199
+
}
200
+
`;
201
+
202
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return a browser-like ErrorEvent-like object, with name, message and multiline line stack 1`] =`
203
+
{
204
+
"error": "Internal error",
205
+
"id": "request-id",
206
+
"ok": false,
207
+
"t": "invoke:result",
208
+
}
209
+
`;
210
+
211
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return an error-like object, with message 1`] =`
212
+
{
213
+
"id": "request-id",
214
+
"ok": true,
215
+
"result": {
216
+
"message": "Handler error",
217
+
},
218
+
"t": "invoke:result",
219
+
}
220
+
`;
221
+
222
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return an error-like object, with name and multiline line stack 1`] =`
223
+
{
224
+
"error": "Internal error",
225
+
"id": "request-id",
226
+
"ok": false,
227
+
"t": "invoke:result",
228
+
}
229
+
`;
230
+
231
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return an error-like object, with name and single line stack 1`] =`
232
+
{
233
+
"error": "Internal error",
234
+
"id": "request-id",
235
+
"ok": false,
236
+
"t": "invoke:result",
237
+
}
238
+
`;
239
+
240
+
exports[`requestInvoke should attempt tool invocation, handler attempting to return an error-like object, with single line stack 1`] =`
241
+
{
242
+
"id": "request-id",
243
+
"ok": true,
244
+
"result": {
245
+
"message": "Handler error",
246
+
"stack": "Stack trace",
247
+
},
248
+
"t": "invoke:result",
249
+
}
250
+
`;
251
+
252
+
exports[`requestInvoke should attempt tool invocation, handler returning AggregateError 1`] =`
253
+
{
254
+
"error": "Internal error",
255
+
"id": "request-id",
256
+
"ok": false,
257
+
"t": "invoke:result",
258
+
}
259
+
`;
260
+
193
261
exports[`requestInvoke should attempt tool invocation, handler returning error 1`] =`
0 commit comments