Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Simplify assert messages by removing redundant descriptions
Maximilian Roosd35abf7ea715
diff --git a/src/commands/list/ci_status.rs b/src/commands/list/ci_status.rsindex 25e916212..3a805a96f 100644--- a/src/commands/list/ci_status.rs+++ b/src/commands/list/ci_status.rs@@ -242,12 +242,9 @@ mod tests {// Call format_indicator(true) directlylet formatted = pr_with_url.format_indicator(true);// Should contain OSC 8 hyperlink escape sequences- assert!(formatted.contains("\x1b]8;;"), "Should contain OSC 8 start");- assert!(- formatted.contains("https://github.com/owner/repo/pull/123"),- "Should contain URL"- );- assert!(formatted.contains("●"), "Should contain indicator");+ assert!(formatted.contains("\x1b]8;;"));+ assert!(formatted.contains("https://github.com/owner/repo/pull/123"));+ assert!(formatted.contains("●"));}#[test]@@ -266,7 +263,7 @@ mod tests {!formatted.contains("\x1b]8;;"),"Should not contain OSC 8 sequences");- assert!(formatted.contains("●"), "Should contain indicator");+ assert!(formatted.contains("●"));}#[test]diff --git a/src/commands/list/progressive_table.rs b/src/commands/list/progressive_table.rsindex 59730c27d..43faafc64 100644--- a/src/commands/list/progressive_table.rs+++ b/src/commands/list/progressive_table.rs@@ -252,7 +252,7 @@ mod tests {assert_eq!(table.lines[0], header);assert_eq!(table.lines[1], skeletons[0]);assert_eq!(table.lines[2], skeletons[1]);- assert!(table.lines[3].is_empty(), "spacer should be blank");+ assert!(table.lines[3].is_empty());assert_eq!(table.lines[4], footer);// No-op when index out of bounds (returns false)diff --git a/src/commands/list/render.rs b/src/commands/list/render.rsindex aae568b29..4e35a0191 100644--- a/src/commands/list/render.rs+++ b/src/commands/list/render.rs@@ -920,7 +920,7 @@ mod tests {line1.push_styled(branch_ja.to_string(), Style::new().bold());line1.pad_to(20); // Pad to width 20- assert_eq!(line1.width(), 20, "Japanese branch should pad to 20");+ assert_eq!(line1.width(), 20);// Case 2: Regular ASCII branchlet branch_ascii = "feature-test";@@ -930,7 +930,7 @@ mod tests {line2.push_styled(branch_ascii.to_string(), Style::new().bold());line2.pad_to(20);- assert_eq!(line2.width(), 20, "ASCII branch should pad to 20");+ assert_eq!(line2.width(), 20);// Both should have the same visual width after paddingassert_eq!(@@ -1042,7 +1042,7 @@ mod tests {assert_eq!(without.width(), total);let rendered_without = without.render();let clean_without = rendered_without.ansi_strip().into_owned();- assert_eq!(clean_without, " ", "Should render as blank");+ assert_eq!(clean_without, " ");// With always_show_zeros=true, (0, 0) renders as "↑0 ↓0"let with = format_diff_like_column(@@ -1089,7 +1089,7 @@ mod tests {line1.push_raw(status_with_emoji.to_string());line1.pad_to(status_start + 6); // Pad to width 6 (typical Status column width)- assert_eq!(line1.width(), 6, "Status column with emoji should pad to 6");+ assert_eq!(line1.width(), 6);// Case 2: Status with only ASCII symbols (↑ is 1 column = 1 total)let status_ascii = "↑";@@ -1104,7 +1104,7 @@ mod tests {line2.push_raw(status_ascii.to_string());line2.pad_to(status_start2 + 6);- assert_eq!(line2.width(), 6, "Status column with ASCII should pad to 6");+ assert_eq!(line2.width(), 6);// Both should have the same visual width after paddingassert_eq!(@@ -1127,7 +1127,7 @@ mod tests {line3.push_raw(complex_status.to_string());line3.pad_to(status_start3 + 10); // Pad to width 10- assert_eq!(line3.width(), 10, "Complex status should pad to 10");+ assert_eq!(line3.width(), 10);}#[test]@@ -1156,7 +1156,7 @@ mod tests {);let rendered1 = result1.render();let clean1 = rendered1.ansi_strip().into_owned();- assert_eq!(clean1, " +53 -7", "Should be ' +53 -7'");+ assert_eq!(clean1, " +53 -7");// Test case 2: (33, 23) - both mediumlet result2 = format_diff_like_column(@@ -1176,7 +1176,7 @@ mod tests {);let rendered2 = result2.render();let clean2 = rendered2.ansi_strip().into_owned();- assert_eq!(clean2, " +33 -23", "Should be ' +33 -23'");+ assert_eq!(clean2, " +33 -23");// Test case 3: (2, 2) - both small (needs padding)let result3 = format_diff_like_column(@@ -1196,7 +1196,7 @@ mod tests {);let rendered3 = result3.render();let clean3 = rendered3.ansi_strip().into_owned();- assert_eq!(clean3, " +2 -2", "Should be ' +2 -2'");+ assert_eq!(clean3, " +2 -2");// Verify vertical alignment: the ones digits should be in the same column// The ones digit should be at position 3 for all cases (with 2-digit allocation)@@ -1268,16 +1268,8 @@ mod tests {);assert_eq!(overflow_result.width(), total);let rendered = overflow_result.render();- assert!(- rendered.contains("+1") && rendered.contains('K'),- "Positive overflow should show +1K (may have styling), got: {}",- rendered- );- assert!(- rendered.contains("500"),- "Negative value should show normally when positive overflows, got: {}",- rendered- );+ assert!(rendered.contains("+1") && rendered.contains('K'));+ assert!(rendered.contains("500"));// Case 3: Negative overflow// Should show: "+500 -1K" (positive normal, negative with K suffix)@@ -1298,16 +1290,8 @@ mod tests {);assert_eq!(overflow_result2.width(), total);let rendered2 = overflow_result2.render();- assert!(- rendered2.contains("500"),- "Positive value should show normally when negative overflows, got: {}",- rendered2- );- assert!(- rendered2.contains("-1") && rendered2.contains('K'),- "Negative overflow should show -1K (may have styling), got: {}",- rendered2- );+ assert!(rendered2.contains("500"));+ assert!(rendered2.contains("-1") && rendered2.contains('K'));// Case 4: Extreme overflow (>= 10K values show ∞ to avoid false precision)let extreme_overflow = format_diff_like_column(@@ -1331,16 +1315,8 @@ mod tests {"100K overflow should fit in allocated width");let extreme_rendered = extreme_overflow.render();- assert!(- extreme_rendered.contains("+∞"),- "100K+ overflow should show +∞ (may have styling), got: {}",- extreme_rendered- );- assert!(- extreme_rendered.contains("-∞"),- "100K+ overflow should show -∞ (may have styling), got: {}",- extreme_rendered- );+ assert!(extreme_rendered.contains("+∞"));+ assert!(extreme_rendered.contains("-∞"));// Test overflow with Arrows variant (↑ and ↓)let arrow_total = 7;@@ -1364,16 +1340,8 @@ mod tests {);assert_eq!(arrow_overflow.width(), arrow_total);let arrow_rendered = arrow_overflow.render();- assert!(- arrow_rendered.contains("↑1") && arrow_rendered.contains('K'),- "Arrow positive overflow should show ↑1K (may have styling), got: {}",- arrow_rendered- );- assert!(- arrow_rendered.contains("50"),- "Negative value should show normally when positive overflows, got: {}",- arrow_rendered- );+ assert!(arrow_rendered.contains("↑1") && arrow_rendered.contains('K'));+ assert!(arrow_rendered.contains("50"));// Case 6: Arrow negative overflow// Should show with K suffix@@ -1394,15 +1362,7 @@ mod tests {);assert_eq!(arrow_overflow2.width(), arrow_total);let arrow_rendered2 = arrow_overflow2.render();- assert!(- arrow_rendered2.contains("50"),- "Positive value should show normally when negative overflows, got: {}",- arrow_rendered2- );- assert!(- arrow_rendered2.contains("↓1") && arrow_rendered2.contains('K'),- "Arrow negative overflow should show ↓1K (may have styling), got: {}",- arrow_rendered2- );+ assert!(arrow_rendered2.contains("50"));+ assert!(arrow_rendered2.contains("↓1") && arrow_rendered2.contains('K'));}}diff --git a/src/commands/select.rs b/src/commands/select.rsindex 7ccdeefff..9bb903fdc 100644--- a/src/commands/select.rs+++ b/src/commands/select.rs@@ -1138,10 +1138,10 @@ mod tests {let output = format_log_output_with_formatter(input, fixed_time_formatter);// Should contain the hash and message- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Fix bug"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Fix bug"));// Should contain formatted time- assert!(output.contains("1h"), "output: {}", output);+ assert!(output.contains("1h"));}#[test]@@ -1153,10 +1153,10 @@ mod tests {let output = format_log_output_with_formatter(input, fixed_time_formatter);// Should contain the hash and message- assert!(output.contains("abc1234"), "output: {}", output);+ assert!(output.contains("abc1234"));// Stats should be accumulated: 10+3=13 insertions, 5+0=5 deletions// The output should contain the stats in the formatted line- assert!(output.contains("Add feature"), "output: {}", output);+ assert!(output.contains("Add feature"));// Verify stats are present (green +13, red -5)assert!(output.contains("+13"), "expected +13 in output: {}", output);assert!(output.contains("-5"), "expected -5 in output: {}", output);@@ -1172,10 +1172,10 @@ mod tests {let output = format_log_output_with_formatter(input, fixed_time_formatter);// Both commits should be in output- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("def5678"), "output: {}", output);- assert!(output.contains("First commit"), "output: {}", output);- assert!(output.contains("Second commit"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("def5678"));+ assert!(output.contains("First commit"));+ assert!(output.contains("Second commit"));// Output should be two lines (one per commit)let lines: Vec<&str> = output.lines().collect();@@ -1194,8 +1194,8 @@ mod tests {let input = "abc1234\x1f1699999000\x1f Just a commit";let output = format_log_output_with_formatter(input, fixed_time_formatter);- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Just a commit"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Just a commit"));}#[test]@@ -1205,8 +1205,8 @@ mod tests {| 5\t2\tfile.rs";let output = format_log_output_with_formatter(input, fixed_time_formatter);- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Commit with graph"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Commit with graph"));// Verify stats are presentassert!(output.contains("+5"), "expected +5 in output: {}", output);assert!(output.contains("-2"), "expected -2 in output: {}", output);@@ -1222,8 +1222,8 @@ mod tests {// Binary files treated as 0 additions/deletions// Should still format the commit line- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Add image"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Add image"));// Verify stats: 0 (binary) + 5 = 5 insertions, 0 deletionsassert!(output.contains("+5"), "expected +5 in output: {}", output);}@@ -1235,7 +1235,7 @@ mod tests {let output = format_log_output_with_formatter(input, fixed_time_formatter);// Should be empty since no valid commit lines (no FIELD_DELIM)- assert!(output.is_empty(), "output: {}", output);+ assert!(output.is_empty());}#[test]@@ -1245,7 +1245,7 @@ mod tests {let output = format_log_output_with_formatter(input, fixed_time_formatter);// Should output the line as-is since it's malformed (only one \x1f)- assert!(output.contains("abc1234"), "output: {}", output);+ assert!(output.contains("abc1234"));}#[test]@@ -1255,8 +1255,8 @@ mod tests {0\t50\told_file.rs";let output = format_log_output_with_formatter(input, fixed_time_formatter);- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Remove old code"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Remove old code"));// Should show deletionsassert!(output.contains("-50"), "expected -50 in output: {}", output);}@@ -1268,7 +1268,7 @@ mod tests {1500\t800\tlarge_file.rs";let output = format_log_output_with_formatter(input, fixed_time_formatter);- assert!(output.contains("abc1234"), "output: {}", output);+ assert!(output.contains("abc1234"));// Large numbers should use K notationassert!(output.contains("+1K") || output.contains("+1.5K"),@@ -1284,8 +1284,8 @@ mod tests {let stats = (10, 5);let output = format_commit_line(commit_line, stats, &fixed_time_formatter);- assert!(output.contains("abc1234"), "output: {}", output);- assert!(output.contains("Test commit"), "output: {}", output);+ assert!(output.contains("abc1234"));+ assert!(output.contains("Test commit"));assert!(output.contains("+10"), "expected +10 in output: {}", output);assert!(output.contains("-5"), "expected -5 in output: {}", output);assert!(output.contains("1h"), "expected time in output: {}", output);diff --git a/src/display.rs b/src/display.rsindex 6add56fa5..f1202e222 100644--- a/src/display.rs+++ b/src/display.rs@@ -127,7 +127,7 @@ mod tests {let text = "Fix bug with parsing and more text here";let result = truncate_to_width(text, 25);println!("Normal truncation: '{}'", result);- assert!(result.ends_with('…'), "Should end with ellipsis");+ assert!(result.ends_with('…'));}#[test]@@ -136,7 +136,7 @@ mod tests {let result = truncate_to_width(text, 25);// Shows what happens when truncation lands on existing "..."println!("ASCII ellipsis: '{}'", result);- assert!(result.ends_with('…'), "Should end with ellipsis");+ assert!(result.ends_with('…'));}#[test]@@ -145,7 +145,7 @@ mod tests {let result = truncate_to_width(text, 25);// Shows what happens when truncation lands on existing "…"println!("Unicode ellipsis: '{}'", result);- assert!(result.ends_with('…'), "Should end with ellipsis");+ assert!(result.ends_with('…'));}#[test]@@ -160,14 +160,14 @@ mod tests {fn test_truncate_exact_width() {let text = "This is a very long message that needs truncation";let result = truncate_to_width(text, 30);- assert!(result.ends_with('…'), "Should end with ellipsis");+ assert!(result.ends_with('…'));assert!(!result.contains(" …"),"Should not have space before ellipsis");// Should truncate at exact width (mid-word if needed)use unicode_width::UnicodeWidthStr;- assert_eq!(result.width(), 30, "Should fill exact width");+ assert_eq!(result.width(), 30);}#[test]@@ -196,7 +196,7 @@ mod tests {use unicode_width::UnicodeWidthStr;// Should truncate mid-word if no space foundassert!(result.width() <= 20, "Width should be <= 20");- assert!(result.ends_with('…'), "Should end with ellipsis");+ assert!(result.ends_with('…'));}#[test]diff --git a/src/git/test.rs b/src/git/test.rsindex 2060d35a0..a738b9c5c 100644--- a/src/git/test.rs+++ b/src/git/test.rs@@ -10,7 +10,7 @@ use rstest::rstest;/// Helper to parse a single worktree from porcelain outputfn parse_single(input: &str) -> Worktree {let list = Worktree::parse_porcelain_list(input).expect("parse ok");- assert_eq!(list.len(), 1, "expected single worktree");+ assert_eq!(list.len(), 1);list.into_iter().next().unwrap()}diff --git a/src/styling/format.rs b/src/styling/format.rsindex d5f19b413..e4e95b7d3 100644--- a/src/styling/format.rs+++ b/src/styling/format.rs@@ -453,7 +453,7 @@ mod tests {" This is a longer text that should wrap across multiple lines",40,);- assert!(result.len() > 1, "Should have wrapped");+ assert!(result.len() > 1);// All lines should have the 10-space indentfor line in &result {assert!(diff --git a/src/styling/line.rs b/src/styling/line.rsindex 555337aea..65b824317 100644--- a/src/styling/line.rs+++ b/src/styling/line.rs@@ -253,7 +253,7 @@ mod tests {fn test_truncate_visible_zero_width() {let text = "hello world";let out = truncate_visible(text, 0);- assert!(out.is_empty(), "Zero width should return empty string");+ assert!(out.is_empty());}#[test]diff --git a/src/styling/mod.rs b/src/styling/mod.rsindex c35d417ab..c1abcd564 100644--- a/src/styling/mod.rs+++ b/src/styling/mod.rs@@ -181,7 +181,7 @@ command = "npm install"line.push_raw("↑3 ↓2");// "Branch" (6) + " " (2) + "↑3 ↓2" (5) = 13- assert_eq!(line.width(), 13, "Line width should be 13");+ assert_eq!(line.width(), 13);}#[test]@@ -191,11 +191,11 @@ command = "npm install"assert_eq!(line.width(), 4);line.pad_to(10);- assert_eq!(line.width(), 10, "After padding to 10, width should be 10");+ assert_eq!(line.width(), 10);// Padding when already at target should not change widthline.pad_to(10);- assert_eq!(line.width(), 10, "Padding again should not change width");+ assert_eq!(line.width(), 10);}#[test]@@ -236,7 +236,7 @@ command = "npm install"let result = super::wrap_text_at_width(text, 30);// Should wrap at word boundaries- assert!(result.len() > 1, "Should wrap into multiple lines");+ assert!(result.len() > 1);// Each line should be within the width limit (or be a single long word)for line in &result {@@ -458,7 +458,7 @@ command = "npm install"let result = wrap_styled_text(text, 20);// Should wrap into multiple lines- assert!(result.len() > 1, "Should wrap into multiple lines");+ assert!(result.len() > 1);// Each line should be within width limit (using visual_width to ignore ANSI codes)for line in &result {@@ -480,7 +480,7 @@ command = "npm install"let result = wrap_styled_text(&input, 15);// Should wrap- assert!(result.len() > 1, "Should wrap into multiple lines");+ assert!(result.len() > 1);// First line should start with bold codeassert!(@@ -612,7 +612,7 @@ cp -cR {{ repo_root }}/target/debug/.fingerprint {{ repo_root }}/target/debug/bulet result = format_bash_with_gutter(multiline);let lines: Vec<&str> = result.lines().collect();- assert_eq!(lines.len(), 2, "Should have 2 lines");+ assert_eq!(lines.len(), 2);// Extract the styling for unhighlighted text on each line// Line 1 ends with `{{ worktree` - find what style it's underdiff --git a/tests/integration_tests/approval_pty.rs b/tests/integration_tests/approval_pty.rsindex 232dc30f3..eedb78afa 100644--- a/tests/integration_tests/approval_pty.rs+++ b/tests/integration_tests/approval_pty.rs@@ -172,7 +172,7 @@ fn test_approval_prompt_accept(repo: TestRepo) {);let normalized = normalize_output(&output);- assert_eq!(exit_code, 0, "Command should succeed when approved");+ assert_eq!(exit_code, 0);assert_snapshot!("approval_prompt_accept", normalized);}@@ -193,7 +193,7 @@ fn test_approval_prompt_decline(repo: TestRepo) {);let normalized = normalize_output(&output);- assert_eq!(exit_code, 0, "Command should succeed even when declined");+ assert_eq!(exit_code, 0);assert_snapshot!("approval_prompt_decline", normalized);}@@ -311,7 +311,7 @@ test = "echo 'Running tests...'");let normalized = normalize_output(&output);- assert_eq!(exit_code, 0, "Command should succeed when approved");+ assert_eq!(exit_code, 0);assert!(normalized.contains("install") && normalized.contains("Installing dependencies"),"Should show command name 'install' and execute it"@@ -359,7 +359,7 @@ approved-commands = ["echo 'Second command'"]);let normalized = normalize_output(&output);- assert_eq!(exit_code, 0, "Command should succeed when approved");+ assert_eq!(exit_code, 0);// Check that only 2 commands are shown in the prompt (ANSI codes may be in between)assert!(diff --git a/tests/integration_tests/approval_save.rs b/tests/integration_tests/approval_save.rsindex c8efceb3d..4d2422ef6 100644--- a/tests/integration_tests/approval_save.rs+++ b/tests/integration_tests/approval_save.rs@@ -250,8 +250,8 @@ fn test_approval_saves_to_new_config_file() {.unwrap();// Verify directory and file were created- assert!(config_path.exists(), "Config file should be created");- assert!(config_dir.exists(), "Config directory should be created");+ assert!(config_path.exists());+ assert!(config_dir.exists());// Verify contentlet content = fs::read_to_string(&config_path).unwrap();diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rsindex 74e91e24c..501ee77ed 100644--- a/tests/integration_tests/completion.rs+++ b/tests/integration_tests/completion.rs@@ -929,8 +929,8 @@ fn test_complete_filters_options_when_positionals_exist(repo: TestRepo) {let stdout = String::from_utf8_lossy(&output.stdout);// Should have branch completions- assert!(stdout.contains("feature"), "Should contain feature branch");- assert!(stdout.contains("main"), "Should contain main branch");+ assert!(stdout.contains("feature"));+ assert!(stdout.contains("main"));// Should NOT have options (they're filtered out when positionals exist)assert!(@@ -951,9 +951,9 @@ fn test_complete_subcommands_filter_options(repo: TestRepo) {let suggestions = value_suggestions(&stdout);// Should have subcommands- assert!(suggestions.contains(&"switch"), "Should contain switch");- assert!(suggestions.contains(&"list"), "Should contain list");- assert!(suggestions.contains(&"merge"), "Should contain merge");+ assert!(suggestions.contains(&"switch"));+ assert!(suggestions.contains(&"list"));+ assert!(suggestions.contains(&"merge"));// Should NOT have global optionsassert!(diff --git a/tests/integration_tests/list_progressive.rs b/tests/integration_tests/list_progressive.rsindex 0541db01c..ad7db5c53 100644--- a/tests/integration_tests/list_progressive.rs+++ b/tests/integration_tests/list_progressive.rs@@ -24,7 +24,7 @@ fn test_list_progressive_rendering_basic(mut repo: TestRepo) {);// Basic assertions- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);assert!(output.stages.len() > 1,"Should capture multiple stages, got {}",@@ -46,9 +46,9 @@ fn test_list_progressive_rendering_basic(mut repo: TestRepo) {// Verify final output has all worktreeslet final_text = output.final_output();- assert!(final_text.contains("feature-a"), "Should contain feature-a");- assert!(final_text.contains("feature-b"), "Should contain feature-b");- assert!(final_text.contains("bugfix"), "Should contain bugfix");+ assert!(final_text.contains("feature-a"));+ assert!(final_text.contains("feature-b"));+ assert!(final_text.contains("bugfix"));// Final output should have fewer dots than initial (verified by verify_progressive_filling)// No need for additional assertions - verify_progressive_filling already confirms progressive behavior@@ -180,7 +180,7 @@ fn test_list_progressive_fast_command(repo: TestRepo) {ProgressiveCaptureOptions::with_byte_interval(600),);- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// Even fast commands should capture at least the final stateassert!(diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_start_commands.rsindex 25028e76f..24bc7ce5e 100644--- a/tests/integration_tests/post_start_commands.rs+++ b/tests/integration_tests/post_start_commands.rs@@ -603,7 +603,7 @@ approved-commands = ["sleep 0.1 && echo 'Background task done' > background.txt"let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");let git_common_dir = resolve_git_common_dir(&worktree_path);let log_dir = git_common_dir.join("wt-logs");- assert!(log_dir.exists(), "Log directory should be created");+ assert!(log_dir.exists());// Wait for the background command to completelet output_file = worktree_path.join("background.txt");diff --git a/tests/integration_tests/shell_integration_prompt.rs b/tests/integration_tests/shell_integration_prompt.rsindex cab628da3..111d710c4 100644--- a/tests/integration_tests/shell_integration_prompt.rs+++ b/tests/integration_tests/shell_integration_prompt.rs@@ -324,7 +324,7 @@ mod pty_tests {"", // No input needed - should not prompt);- assert_eq!(exit_code, 0, "Switch should succeed");+ assert_eq!(exit_code, 0);// Should NOT contain prompt (detected already installed)assert!(@@ -369,7 +369,7 @@ mod pty_tests {"n\n", // User declines);- assert_eq!(exit_code, 0, "Switch should succeed even when declining");+ assert_eq!(exit_code, 0);let normalized = normalize_output(&output, temp_home.path());@@ -428,7 +428,7 @@ mod pty_tests {"y\n", // User accepts);- assert_eq!(exit_code, 0, "Switch should succeed");+ assert_eq!(exit_code, 0);let normalized = normalize_output(&output, temp_home.path());@@ -488,7 +488,7 @@ mod pty_tests {"?\nn\n", // User requests preview, then declines);- assert_eq!(exit_code, 0, "Switch should succeed");+ assert_eq!(exit_code, 0);let normalized = normalize_output(&output, temp_home.path());@@ -557,7 +557,7 @@ mod pty_tests {"", // No input needed);- assert_eq!(exit_code, 0, "Second switch should succeed");+ assert_eq!(exit_code, 0);assert!(!output.contains("Install shell integration"),diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 260e59c44..400e1edeb 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -1179,7 +1179,7 @@ approved-commands = ["echo 'test command executed'"]output.assert_no_directive_leaks();output.assert_no_job_control_messages();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// Normalize paths in output for snapshot testing// Snapshot the output@@ -1205,7 +1205,7 @@ approved-commands = ["echo 'test command executed'"]// No directives should leakoutput.assert_no_directive_leaks();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// The executed command output should appearassert!(@@ -1318,7 +1318,7 @@ approved-commands = ["echo 'background task'"]// No directives should leakoutput.assert_no_directive_leaks();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// Snapshot verifies progress messages appear to users// (catches the bug where progress() was incorrectly suppressed)@@ -1366,7 +1366,7 @@ approved-commands = ["echo 'fish background task'"]// No directives should leakoutput.assert_no_directive_leaks();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// Snapshot verifies progress messages appear to users through Fish wrapperassert_snapshot!(output.normalized());@@ -1397,7 +1397,7 @@ approved-commands = ["echo 'fish background task'"]// No directives should leakoutput.assert_no_directive_leaks();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// All three lines should be executed and visibleassert!(output.combined.contains("line 1"), "First line missing");@@ -1418,7 +1418,7 @@ approved-commands = ["echo 'fish background task'"]// No directives should leak even with minimal outputoutput.assert_no_directive_leaks();- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);// Should still show success messageassert!(@@ -1577,7 +1577,7 @@ approved-commands = ["echo 'background job'"]let output = exec_through_wrapper("zsh", &repo, "switch", &["--create", "zsh-job-test"]);- assert_eq!(output.exit_code, 0, "Command should succeed");+ assert_eq!(output.exit_code, 0);output.assert_no_directive_leaks();// Critical: zsh should NOT show job control notifications@@ -1711,7 +1711,7 @@ approved-commands = ["echo 'bash background'"]let (combined, exit_code) =exec_in_pty_interactive("bash", &final_script, repo.root_path(), &env_vars, &[]);- assert_eq!(exit_code, 0, "Script should succeed");+ assert_eq!(exit_code, 0);assert!(combined.contains("__COMPLETION_REGISTERED__"),"Bash completions should be registered after sourcing wrapper.\nOutput:\n{}",@@ -1753,7 +1753,7 @@ approved-commands = ["echo 'bash background'"]let (combined, exit_code) =exec_in_pty_interactive("fish", &final_script, repo.root_path(), &env_vars, &[]);- assert_eq!(exit_code, 0, "Script should succeed");+ assert_eq!(exit_code, 0);assert!(combined.contains("__COMPLETION_REGISTERED__"),"Fish completions should be registered after sourcing wrapper.\nOutput:\n{}",@@ -1797,7 +1797,7 @@ approved-commands = ["echo 'bash background'"]let (combined, exit_code) =exec_in_pty_interactive("zsh", &final_script, repo.root_path(), &env_vars, &[]);- assert_eq!(exit_code, 0, "Script should succeed");+ assert_eq!(exit_code, 0);assert!(combined.contains("__WRAPPER_REGISTERED__"),"Zsh wrapper function should be registered after sourcing.\nOutput:\n{}",@@ -2220,7 +2220,7 @@ command = "{}"&[("PATH", &path_with_bin)],);- assert_eq!(output.exit_code, 0, "Merge should succeed");+ assert_eq!(output.exit_code, 0);assert_snapshot!(output.normalized());}@@ -2300,7 +2300,7 @@ fi&[("PATH", &path_with_bin)],);- assert_eq!(output.exit_code, 0, "Switch should succeed");+ assert_eq!(output.exit_code, 0);assert_snapshot!(output.normalized());}diff --git a/tests/integration_tests/user_hooks.rs b/tests/integration_tests/user_hooks.rsindex accca3ad7..6cfbb9dcf 100644--- a/tests/integration_tests/user_hooks.rs+++ b/tests/integration_tests/user_hooks.rs@@ -81,12 +81,12 @@ approved-commands = ["echo 'PROJECT_HOOK' >> hook_order.txt"]// Verify execution orderlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");let order_file = worktree_path.join("hook_order.txt");- assert!(order_file.exists(), "Hook order file should exist");+ assert!(order_file.exists());let contents = fs::read_to_string(&order_file).unwrap();let lines: Vec<&str> = contents.lines().collect();- assert_eq!(lines.len(), 2, "Should have two hooks executed");+ assert_eq!(lines.len(), 2);assert_eq!(lines[0], "USER_HOOK", "User hook should run first");assert_eq!(lines[1], "PROJECT_HOOK", "Project hook should run second");}