weightedNode.spec.tsx 465 B

1234567891011121314151617
  1. import {WeightedNode} from 'sentry/utils/profiling/weightedNode';
  2. describe('weightedNode', () => {
  3. it('adds to total time', () => {
  4. const node = new WeightedNode();
  5. node.addToTotalWeight(100);
  6. node.addToTotalWeight(100);
  7. expect(node.totalWeight).toBe(200);
  8. });
  9. it('adds to self time', () => {
  10. const node = new WeightedNode();
  11. node.addToSelfWeight(100);
  12. node.addToSelfWeight(100);
  13. expect(node.selfWeight).toBe(200);
  14. });
  15. });