-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make traceID, startTime, endTime, duration and traceName available for Link Patterns #1178
Changes from 4 commits
0318def
adf1e94
4b74c6d
c4e42e1
d3980bc
4d507da
4991ce3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ import { DEFAULT_HEIGHTS, VirtualizedTraceViewImpl } from './VirtualizedTraceVie | |
import traceGenerator from '../../../demo/trace-generators'; | ||
import transformTraceData from '../../../model/transform-trace-data'; | ||
import updateUiFindSpy from '../../../utils/update-ui-find'; | ||
import * as getLinks from '../../../model/link-patterns'; | ||
|
||
jest.mock('./SpanTreeOffset'); | ||
jest.mock('../../../utils/update-ui-find'); | ||
|
@@ -430,4 +431,22 @@ describe('<VirtualizedTraceViewImpl>', () => { | |
expect(focusUiFindMatchesMock).toHaveBeenLastCalledWith(trace, spanName, false); | ||
}); | ||
}); | ||
|
||
describe('linksGetter()', () => { | ||
let getLinksSpy; | ||
|
||
beforeAll(() => { | ||
getLinksSpy = jest.spyOn(getLinks, 'default'); | ||
}); | ||
|
||
afterAll(() => { | ||
getLinksSpy.mockRestore(); | ||
}); | ||
|
||
it('calls getLinks with expected params', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. stale title |
||
const span = trace.spans[1]; | ||
instance.linksGetter(span, span.tags, 0); | ||
expect(getLinksSpy).toHaveBeenCalledWith(span, span.tags, 0, trace); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it would be better to validate the actual value returned, which, as I understand, is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't find a clean way to initialize |
||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit