Open
Description
See this repo for a reproduction https://github.com/Sanderovich/web-test-runner-called-with-match-error-reproduction.
When an expect(spy).to.be.calledWithMatch()
is unsuccesful the expect throws an AssertionError
that web test runner can not handle which causes the following exception.
The crash seems to happen because of the actual
property inside the AssertionError
. The actual
property is set to a function called proxy and structuredClone
cannot handle functions (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
A possible solution could be to JSON.stringify()
and JSON.parse()
the AssertionError
before the structuredClone
.
Metadata
Metadata
Assignees
Labels
No labels