We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a8752f commit 17cc5f7Copy full SHA for 17cc5f7
apps/sim/executor/handlers/agent/agent-handler.test.ts
@@ -61,6 +61,21 @@ vi.mock('@/providers', () => ({
61
}),
62
}))
63
64
+vi.mock('@/executor/utils/http', () => ({
65
+ buildAuthHeaders: vi.fn().mockResolvedValue({ 'Content-Type': 'application/json' }),
66
+ buildAPIUrl: vi.fn().mockImplementation((path: string, params?: Record<string, string>) => {
67
+ const url = new URL(path, 'http://localhost:3000')
68
+ if (params) {
69
+ for (const [key, value] of Object.entries(params)) {
70
+ if (value !== undefined && value !== null) {
71
+ url.searchParams.set(key, value)
72
+ }
73
74
75
+ return url
76
+ }),
77
+}))
78
+
79
vi.mock('@sim/db', () => ({
80
db: {
81
select: vi.fn().mockReturnValue({
0 commit comments