diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js index d54068fec8..361c96df29 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js @@ -56,7 +56,6 @@ export class UnconnectedSpanTreeOffset extends React.PureComponent { let wrapper; beforeEach(() => { - spanAncestorIdsSpy.mockReturnValue([parentSpanID, rootSpanID]); + // Mock implementation instead of Mock return value so that each call returns a new array (like normal) + spanAncestorIdsSpy.mockImplementation(() => [parentSpanID, rootSpanID]); props = { addHoverIndentGuideId: jest.fn(), hoverIndentGuideIds: new Set(),