(url, width, height)
| 40 | } |
| 41 | |
| 42 | function assertSize(url, width, height) { |
| 43 | return new Promise(function (resolve, reject) { |
| 44 | var img = new Image(); |
| 45 | img.onload = function () { |
| 46 | expect(img.width).toBe(width, 'image width'); |
| 47 | expect(img.height).toBe(height, 'image height'); |
| 48 | resolve(url); |
| 49 | }; |
| 50 | img.onerror = reject; |
| 51 | img.src = url; |
| 52 | }); |
| 53 | } |
| 54 | |
| 55 | it('should be attached to Plotly', function () { |
| 56 | expect(Plotly.toImage).toBeDefined(); |
no outgoing calls
no test coverage detected
searching dependent graphs…