LiveChat does a lot of JSONP-based polling, and our cleanup scripts
result in the removal of globals those JSONP handlers rely on. PhantomJS
doesn't handle uncaught exceptions very well, so it shits the bed before
the tests can finish.
We're now mocking out the LiveChat library rather than loading
it (there's still one test that checks for successful load) to get
around this issue.
Some long-term fixes we could do: Fix duo-test so it installs a global
Phantom error handler (http://phantomjs.org/api/phantom/handler/on-error.html),
but that would involve a not-insignificant refactoring of duo-test. For
now this will fix the CI failures we're seeing, though.
LiveChat does a lot of JSONP-based polling, and our cleanup scripts result in the removal of globals those JSONP handlers rely on. PhantomJS doesn't handle uncaught exceptions very well, so it shits the bed before the tests can finish.
We're now mocking out the LiveChat library rather than loading it (there's still one test that checks for successful load) to get around this issue.
Some long-term fixes we could do: Fix duo-test so it installs a global Phantom error handler (http://phantomjs.org/api/phantom/handler/on-error.html), but that would involve a not-insignificant refactoring of duo-test. For now this will fix the CI failures we're seeing, though.