Get help with testing, discuss unit testing strategies etc.


Post by soundman »

We recently upgraded from 4.3.1 to 4.4.2 and a good few of our UI tests are now failing due to uncaught rejected promises.

Version 4.0.0 added the following:
Siesta now detects unhandled promise rejections (if browser supports it) and reports a failure (Fixed #4965)
Our UI is quite large and there is neither the time or inclination to go around adding catches for all the uncaught rejections just to account for these test failures (user experience isn't affected by these events at all).

Is there a way to disable or circumvent Siesta detecting these events as we do not particularly care about them?

Post by nickolay »

There's no config option for that currently. What you can do right now is to comment this code in "siesta-all.js":
                        window.addEventListener('unhandledrejection', function (e) {
                            handler.apply(this, [ null, null, null, null, null, e ])
                        }, true)
We'll add a config option in the next release.

Post by soundman »

That's done the trick for us. Thanks for the help.

Post Reply