Skip to content

Run tests in headless browser framework? #123

@adroitwhiz

Description

@adroitwhiz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions