Skip to content

Commit a82fda0

Browse files
committed
Don't stub ExecJS
1 parent 2f0ea1d commit a82fda0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

test/react_renderer_test.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,11 @@ class ReactRendererTest < ActiveSupport::TestCase
3636
end
3737

3838
test 'prerender errors include the error backtrace' do
39-
# Stub the backtrace returned by ExecJS
40-
ExecJS::ProgramError.class_eval {
41-
def backtrace
42-
["Line 1 exception", "Backtrace line 2"]
43-
end
44-
}
45-
4639
err = assert_raises React::Renderer::PrerenderError do
4740
React::Renderer.render("NonexistentComponent", {error: true, exists: false})
4841
end
4942

50-
assert (err.message.ends_with?("Line 1 exception\nBacktrace line 2"))
43+
assert (err.message.count("\n") > 2), "The error has a multi-line backtrace"
5144
end
5245

5346
test 'prerender errors are thrown when given a string' do

0 commit comments

Comments
 (0)