mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-07 07:23:08 +02:00
test(server): report routine telemetry mock failure state
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
6c70800a66
commit
6ce62cac75
1 file changed
+16
-1
@@ -681,6 +681,21 @@ describe("routine routes", () => {
|
||||
userId: "board-user",
|
||||
runId: null,
|
||||
});
|
||||
expect(mockTrackRoutineCreated).toHaveBeenCalledWith(expect.anything());
|
||||
try {
|
||||
expect(mockTrackRoutineCreated).toHaveBeenCalledWith(expect.anything());
|
||||
} catch (error) {
|
||||
// Report mock wiring without importing modules again or changing timing.
|
||||
console.error("Routine creation telemetry mock diagnostic", {
|
||||
clientGetterCalls: mockGetTelemetryClient.mock.calls.length,
|
||||
clientGetterResults: mockGetTelemetryClient.mock.results.slice(-4).map(result => ({
|
||||
type: result.type,
|
||||
truthy: Boolean(result.value),
|
||||
})),
|
||||
trackingCalls: mockTrackRoutineCreated.mock.calls.length,
|
||||
createCalls: mockRoutineService.create.mock.calls.length,
|
||||
activityCalls: mockLogActivity.mock.calls.length,
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user