(node, width, height)
| 866 | } |
| 867 | |
| 868 | function assertItemDims(node, width, height) { |
| 869 | var rect = node.select('rect'); |
| 870 | var actualWidth = +rect.attr('width'); |
| 871 | |
| 872 | // must compare with a tolerance as the exact result |
| 873 | // is browser/font dependent (via getBBox) |
| 874 | expect(Math.abs(actualWidth - width)).toBeLessThan(16); |
| 875 | |
| 876 | // height is determined by 'fontsize', |
| 877 | // so no such tolerance is needed |
| 878 | expect(+rect.attr('height')).toEqual(height); |
| 879 | } |
| 880 | |
| 881 | function click(selection) { |
| 882 | return new Promise(function(resolve) { |
no outgoing calls
no test coverage detected
searching dependent graphs…