Catch Javascript errors in your system tests
How to make your tests fail in case of Javascript errors with capybara and chrome headless