You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
I've stumbled across a bug where JavaScript enabled specs fail silently due to the use of JavaScript's let assignment operator. Using let instead of var will break whatever other code resides in the same <script> tag as the let keyword.
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
options = { js_errors: true }
Capybara::Poltergeist::Driver.new(app, options)
end
This is true despite having js_errors set to be true.
To reproduce run a spec for a page that has:
<script type="text/javascript">
var message = 'works fine';
</script>
versus one that has:
<script type="text/javascript">
let message = 'fails silently';
</script>
The text was updated successfully, but these errors were encountered:
It appears that PhantomJS only reports runtime errors, not parse time errors. Not sure there's anything we can do about that if PhantomJS doesn't tell us.
I've stumbled across a bug where JavaScript enabled specs fail silently due to the use of JavaScript's
let
assignment operator. Usinglet
instead ofvar
will break whatever other code resides in the same <script> tag as the let keyword.This is true despite having
js_errors
set to be true.To reproduce run a spec for a page that has:
versus one that has:
The text was updated successfully, but these errors were encountered: