Skip to content

Commit 6b0b878

Browse files
committed
Webpacker error changed, dont yell at JS errors
1 parent 896b4fc commit 6b0b878

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/react/server_rendering/bundle_renderer_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BundleRendererTest < ActiveSupport::TestCase
3333
test '#render returns HTML' do
3434
result = @renderer.render('Todo', { todo: 'write tests' }, nil)
3535
assert_match(/<li.*write tests<\/li>/, result)
36-
assert_match(/data-react-checksum/, result)
36+
assert_match(/data-reactroot/, result)
3737
end
3838

3939
test '#render accepts strings' do
@@ -70,7 +70,7 @@ class BundleRendererTest < ActiveSupport::TestCase
7070

7171
if WebpackerHelpers.available?
7272
# require() failed:
73-
assert_match(/Invariant Violation:/, err.to_s)
73+
assert_match(/TypeError: Cannot read property 'toLowerCase' of undefined/, err.to_s)
7474
else
7575
# eval() failed:
7676
assert_match(/ReferenceError/, err.to_s)

test/test_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# `page.driver.debug` will cause Poltergeist to open a browser window
4242
inspector: true,
4343
# hide warnings from React.js whitespace changes:
44-
js_errors: true
44+
js_errors: false
4545
}
4646
Capybara::Poltergeist::Driver.new(app, poltergeist_options)
4747
end

0 commit comments

Comments
 (0)