missingInstrumentationNode.spec.tsx 947 B

123456789101112131415161718192021222324252627282930
  1. import {
  2. makeNodeMetadata,
  3. makeSpan,
  4. } from 'sentry/views/performance/newTraceDetails/traceModels/traceTreeTestUtils';
  5. import {TraceTreeNode} from '../traceModels/traceTreeNode';
  6. import {MissingInstrumentationNode} from './missingInstrumentationNode';
  7. describe('MissingInstrumentationNode', () => {
  8. it('stores references to previous and next spans', () => {
  9. const previous = new TraceTreeNode(null, makeSpan(), makeNodeMetadata());
  10. const current = new TraceTreeNode(null, makeSpan(), makeNodeMetadata());
  11. const node = new MissingInstrumentationNode(
  12. new TraceTreeNode(null, makeSpan(), makeNodeMetadata()),
  13. {
  14. type: 'missing_instrumentation',
  15. start_timestamp: previous.value.timestamp,
  16. timestamp: current.value.start_timestamp,
  17. },
  18. makeNodeMetadata(),
  19. previous,
  20. current
  21. );
  22. expect(node.previous).toBe(previous);
  23. expect(node.next).toBe(current);
  24. });
  25. });