mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 11:50:43 +00:00
test: tighten trajectory recorder assertion
This commit is contained in:
@@ -30,10 +30,10 @@ afterEach(() => {
|
||||
function expectTrajectoryRuntimeRecorder(
|
||||
recorder: ReturnType<typeof createTrajectoryRuntimeRecorder>,
|
||||
): TrajectoryRuntimeRecorder {
|
||||
expect(recorder).toEqual(expect.objectContaining({ recordEvent: expect.any(Function) }));
|
||||
if (recorder === null) {
|
||||
throw new Error("Expected trajectory runtime recorder");
|
||||
}
|
||||
expect(typeof recorder.recordEvent).toBe("function");
|
||||
return recorder;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user