@@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest"
22import { formatSuccess } from "../src/app/program.js"
33
44describe ( "formatSuccess" , ( ) => {
5- it ( "guides users to pnpm after bootstrap succeeds" , ( ) => {
5+ it ( "guides users to the project directory and pnpm dev after bootstrap succeeds" , ( ) => {
66 const output = formatSuccess ( {
77 projectDir : "/tmp/demo-project" ,
88 projectName : "Demo Project" ,
@@ -11,9 +11,21 @@ describe("formatSuccess", () => {
1111 } )
1212
1313 expect ( output ) . toContain ( "Dependencies already installed with pnpm." )
14- expect ( output ) . toContain ( 'cd "/tmp/demo-project"' )
15- expect ( output ) . toContain ( "pnpm run agent" )
14+ expect ( output ) . toContain ( "cd demo-project" )
15+ expect ( output ) . toContain ( "pnpm run dev" )
16+ expect ( output ) . not . toContain ( 'cd "/tmp/demo-project"' )
17+ expect ( output ) . not . toContain ( "pnpm run agent" )
1618 expect ( output ) . not . toContain ( "&&" )
17- expect ( output ) . not . toContain ( "npm run dev" )
19+ } )
20+
21+ it ( "uses the last path segment for Windows-style project paths too" , ( ) => {
22+ const output = formatSuccess ( {
23+ projectDir : "D:\\Projects\\test-box\\spawndock-app-11" ,
24+ projectName : "Spawndock App 11" ,
25+ previewOrigin : "https://api.example.com/preview/spawndock-app-11" ,
26+ mcpAgents : [ "OpenCode" ] ,
27+ } )
28+
29+ expect ( output ) . toContain ( "Next:\n cd spawndock-app-11\n pnpm run dev" )
1830 } )
1931} )
0 commit comments