Skip to content

Bug: Assertions on HTMLElements make earl hang #294

@dhardtke

Description

@dhardtke

We are using earl as assertion library for our Angular frontend.

If we write an assertion like this:

const $searchBar = document.getElementById('searchBar');
expect($searchBar).toBeTruthy();

then earl hangs because formatting ("formatCompact") tries to stringify this circular structure.

Can we add an extra condition to make earl serialize HTMLElements differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions