Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Add --no-background flag to ensure worktree removal completes before next test

Maximilian Roos6e5aac2b220c
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index cb8d7eba6..53780ae9b 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -466,10 +466,11 @@ fn test_remove_main_worktree_vs_linked_worktree() {
let linked_wt_path = repo.add_worktree("feature");
// Part 1: Verify linked worktree CAN be removed (from within it)
+ // Use --no-background to ensure removal completes before creating next worktree
snapshot_remove(
"remove_main_vs_linked__from_linked_succeeds",
&repo,
- &[],
+ &["--no-background"],
Some(&linked_wt_path),
);
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap b/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
index 6874301b0..427ef7337 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
@@ -4,6 +4,7 @@ info:
program: wt
args:
- remove
+ - "--no-background"
env:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
@@ -22,4 +23,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-πŸ”„ Removing feature worktree & branch in background (already in main)
+πŸ”„ Removing current worktree...
+βœ… Removed feature worktree & branch; changed directory to [REPO] (already in main)