Skip to content

Commit a699fa4

Browse files
committed
clear comments
1 parent 3d915eb commit a699fa4

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

tests/ai_tab.rs

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,7 @@ fn test_ai_tab_after_edit_checkpoint_includes_dirty_files_and_paths() {
135135
let edited = result
136136
.edited_filepaths
137137
.expect("after_edit should include edited filepaths");
138-
assert_eq!(
139-
edited,
140-
vec!["/Users/test/project/src/main.rs".to_string()]
141-
);
138+
assert_eq!(edited, vec!["/Users/test/project/src/main.rs".to_string()]);
142139

143140
let dirty_files = result
144141
.dirty_files
@@ -173,7 +170,10 @@ fn test_ai_tab_rejects_invalid_hook_event() {
173170
message
174171
);
175172
}
176-
other => panic!("expected PresetError for invalid hook_event_name, got {:?}", other),
173+
other => panic!(
174+
"expected PresetError for invalid hook_event_name, got {:?}",
175+
other
176+
),
177177
}
178178
}
179179

@@ -252,7 +252,9 @@ fn test_ai_tab_e2e_marks_ai_lines() {
252252
);
253253

254254
// AI tab inserts new lines alongside the existing content
255-
let ai_content = "console.log(\"hello world\");\n// Log hello world\nconsole.log(\"hello from ai\");\n".to_string();
255+
let ai_content =
256+
"console.log(\"hello world\");\n// Log hello world\nconsole.log(\"hello from ai\");\n"
257+
.to_string();
256258
fs::write(&file_path, &ai_content).unwrap();
257259

258260
run_ai_tab_checkpoint(
@@ -269,7 +271,8 @@ fn test_ai_tab_e2e_marks_ai_lines() {
269271
}),
270272
);
271273

272-
repo.stage_all_and_commit("Accept AI tab completion").unwrap();
274+
repo.stage_all_and_commit("Accept AI tab completion")
275+
.unwrap();
273276

274277
let mut file = repo.filename(relative_path);
275278
file.assert_lines_and_blame(lines![
@@ -304,11 +307,7 @@ fn test_ai_tab_e2e_handles_dirty_files_map() {
304307
let lib_file_path_str = lib_file_path.to_string_lossy().to_string();
305308
let readme_file_path_str = readme_file_path.to_string_lossy().to_string();
306309

307-
println!("lib_file_path_str: {}", lib_file_path_str);
308-
println!("readme_file_path_str: {}", readme_file_path_str);
309-
310310
let working_logs = repo.current_working_logs();
311-
println!("dirty_files: {:?}", working_logs.dirty_files);
312311

313312
// Before edit snapshot includes all dirty files (AI target plus unrelated human edits)
314313
run_ai_tab_checkpoint(
@@ -333,7 +332,6 @@ fn test_ai_tab_e2e_handles_dirty_files_map() {
333332
fs::write(&lib_file_path, &ai_content).unwrap();
334333

335334
let working_logs = repo.current_working_logs();
336-
println!("dirty_files: {:?}", working_logs.dirty_files);
337335

338336
run_ai_tab_checkpoint(
339337
&repo,
@@ -350,15 +348,11 @@ fn test_ai_tab_e2e_handles_dirty_files_map() {
350348
}),
351349
);
352350

353-
354351
let working_logs = repo.current_working_logs();
355-
println!("dirty_files: {:?}", working_logs.dirty_files);
356-
357-
let commit_result = repo.stage_all_and_commit("Record AI tab completion while other files dirty").unwrap();
358-
println!("COMMIT OUTPUT: {}", commit_result.stdout);
359352

360-
361-
commit_result.print_authorship();
353+
let commit_result = repo
354+
.stage_all_and_commit("Record AI tab completion while other files dirty")
355+
.unwrap();
362356

363357
let mut file = repo.filename("src/lib.rs");
364358
file.assert_lines_and_blame(lines![
@@ -369,4 +363,4 @@ fn test_ai_tab_e2e_handles_dirty_files_map() {
369363
" println!(\"from ai\");".ai(),
370364
"}".ai(),
371365
]);
372-
}
366+
}

0 commit comments

Comments
 (0)