Skip to content

Commit 5ae4ebb

Browse files
committed
update test
1 parent a1e34f8 commit 5ae4ebb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/react/server_rendering/bundle_renderer_test.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ class BundleRendererTest < ActiveSupport::TestCase
6868
@renderer.render("NonExistentComponent", {}, nil)
6969
end
7070

71-
assert_match(/ReferenceError/, err.to_s)
71+
if WebpackerHelpers.available?
72+
# require() failed:
73+
assert_match(/Invariant Violation: Element type is invalid: expected a string/, err.to_s)
74+
else
75+
# eval() failed:
76+
assert_match(/ReferenceError/, err.to_s)
77+
end
7278
assert_match(/NonExistentComponent/, err.to_s, "it names the component")
7379

7480
assert_match(/\n/, err.to_s, "it includes the multi-line backtrace")

0 commit comments

Comments
 (0)