You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...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.
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 callsHTMLCanvasElement.getContext
, and measuring an SVG requires callinggetBBox
.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.
The text was updated successfully, but these errors were encountered: