Skip to content

Commit 9d204cc

Browse files
justin808claude
andcommitted
Fix Pro console logging test for new format
The test was unconditionally removing the first line assuming there would be a leading blank line from the old wrapInScriptTags format. With the new approach where Ruby wraps the console script using content_tag (via wrap_console_script_with_nonce), there's no leading blank line, so the test was incorrectly skipping the first log line. Changed to only shift if the first line is actually empty. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 0740ba6 commit 9d204cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

react_on_rails_pro/spec/dummy/spec/requests/renderer_console_logging_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
script_node = html_nodes.css("script#consoleReplayLog")
2929
script_lines = script_node.text.split("\n")
3030

31-
# First item is a blank line since expected script starts form "\n":
32-
script_lines.shift
31+
# Remove leading blank line if present (old format had it, new format doesn't)
32+
script_lines.shift if script_lines.first && script_lines.first.empty?
3333

3434
# Create external iterators for expected and found console replay script lines:
3535
expected_lines_iterator = expected_lines.to_enum

0 commit comments

Comments
 (0)