Skip to content

Commit bd4ef55

Browse files
committed
test(cli): harden init tests for full scaffold and failure hygiene
- Assert app/ and moose.config.toml on equals-template success path - Assert no scaffold artifacts after unknown-template failure Addresses CodeRabbit feedback on PR #4063. Made-with: Cursor
1 parent 2f6666a commit bd4ef55

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/framework-cli/tests/cli_init.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ fn can_run_cli_init_with_equals_style_template_flag() -> Result<(), Box<dyn std:
159159
cmd.assert().success();
160160

161161
temp.child("package.json").assert(predicate::path::exists());
162+
temp.child("app").assert(predicate::path::exists());
163+
temp.child("moose.config.toml")
164+
.assert(predicate::path::exists());
162165

163166
Ok(())
164167
}
@@ -224,5 +227,11 @@ fn init_with_unknown_template_flag_prints_template_recovery(
224227
.and(predicate::str::contains("moose template list --json")),
225228
);
226229

230+
temp.child("package.json")
231+
.assert(predicate::path::missing());
232+
temp.child("app").assert(predicate::path::missing());
233+
temp.child("moose.config.toml")
234+
.assert(predicate::path::missing());
235+
227236
Ok(())
228237
}

0 commit comments

Comments
 (0)