Skip to content

Commit a252466

Browse files
committed
test(tests): remove redundant comments from httptap test
Remove extraneous inline comments from the httptap formula test to reduce noise and improve readability. The test logic and assertions remain unchanged; this only clarifies the test by eliminating commented explanations that duplicated obvious behavior.
1 parent 3f089cf commit a252466

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

Formula/h/httptap.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def install
9191
test do
9292
ENV["NO_COLOR"] = "1"
9393

94-
# Start a minimal local HTTP server that returns 200 OK.
9594
port = free_port
9695
server = TCPServer.new("127.0.0.1", port)
9796

@@ -110,37 +109,30 @@ def install
110109
json_path = testpath/"report.json"
111110
test_url = "http://127.0.0.1:#{port}"
112111

113-
# Run httptap in non-interactive mode with JSON output.
114112
system bin/"httptap", "--metrics-only", "--json", json_path, test_url
115113

116114
server_thread.join
117115
server.close
118116

119-
# Verify JSON output was created.
120117
assert_path_exists json_path, "JSON report was not created"
121118
json_data = JSON.parse(json_path.read)
122119

123-
# Verify request metadata.
124120
assert_equal test_url, json_data["initial_url"]
125121
assert_equal 200, json_data.dig("summary", "final_status")
126122

127-
# Verify steps array structure.
128123
steps = json_data["steps"]
129124
assert_kind_of Array, steps
130125
refute_empty steps, "Steps array should not be empty"
131126

132-
# Verify first step contains expected data.
133127
first_step = steps.first
134128
assert_equal 1, first_step["step_number"]
135129
assert_equal 200, first_step.dig("response", "status")
136130

137-
# Verify timing metrics are present.
138131
timing = first_step["timing"]
139132
assert timing, "Timing data missing"
140133
assert timing["total_ms"], "total_ms missing from timing data"
141134
assert_operator timing["total_ms"], :>=, 0, "total_ms should be non-negative"
142135

143-
# Verify response body if present.
144136
response_body = first_step.dig("response", "body")
145137
assert_match "hello", response_body if response_body
146138
end

0 commit comments

Comments
 (0)