From db77bd6520f0fb045320eb10bf6523dfd5c9e6a9 Mon Sep 17 00:00:00 2001 From: anguohui Date: Tue, 7 Jul 2026 19:57:52 +0800 Subject: [PATCH] test(apps): add full_stack scaffold test case --- shortcuts/apps/apps_init_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/shortcuts/apps/apps_init_test.go b/shortcuts/apps/apps_init_test.go index fc9774430..42e69c451 100644 --- a/shortcuts/apps/apps_init_test.go +++ b/shortcuts/apps/apps_init_test.go @@ -1703,6 +1703,25 @@ func TestRunScaffold_EmptyAppTypeFallback(t *testing.T) { } } +func TestRunScaffold_FullStackPassesTemplate(t *testing.T) { + f := &fakeCommandRunner{results: map[string]fakeCallResult{"git ls-files": {stdout: ""}}} + withFakeRunner(t, f) + kind, err := runScaffold(context.Background(), t.TempDir(), "app_x", "full_stack", "", "") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if kind != scaffoldKindInit { + t.Errorf("kind = %q, want %q", kind, scaffoldKindInit) + } + c := findCall(f.calls, "npx", "-y") + if c == nil { + t.Fatal("npx not called") + } + if !containsAll(c, "--template", "full_stack") { + t.Errorf("expected --template full_stack in args: %v", c) + } +} + func TestRunScaffold_ExplicitTemplateOverride(t *testing.T) { f := &fakeCommandRunner{results: map[string]fakeCallResult{"git ls-files": {stdout: ""}}} withFakeRunner(t, f)