문제

I have a logger which is supposed to catch uncaught error, and send the tracestack to a server.

I'm trying to write unit tests to make sure this works. However, when I throw an error or errorEvent in my test classes, the FlexUnit Runner catches the error and doesn't let the test continue.

How can I unit test this?

도움이 되었습니까?

해결책

The solution to my problem was to call event.preventDefault(); when the error was caught. This prevents the normal behavior of the error to happen, allows my custom events and unit tests to run.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top