-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Expected Behavior...
...should be easy to verify via tests.
Actual Behavior
...could differ significantly between Node + JSDOM, which is where tests are currently run, and the browser, which is where the SVG renderer is used.
The SVG renderer uses a significant number of DOM functions which are out of the scope of what JSDOM emulates-- for instance, the SvgRenderer
constructor calls HTMLCanvasElement.getContext
, and measuring an SVG requires calling getBBox
.
In order to test those parts of the API, those functions must work properly, which requires running tests inside a browser.
I ran into this when writing tests for #85, which required a lot of shimming.
Adding in-browser testing support may also help with #119.