earl icon indicating copy to clipboard operation
earl copied to clipboard

Bug: Assertions on HTMLElements make earl hang

Open dhardtke opened this issue 2 years ago • 0 comments

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?

dhardtke avatar Jul 17 '23 11:07 dhardtke