@@ -17,14 +17,15 @@ describe('development workflow', () => {
1717 expect ( pkg . scripts [ 'dev' ] ) . toBe ( 'bun run scripts/dev.ts' )
1818 expect ( pkg . scripts [ 'dev:agent' ] ) . toBe ( 'bun run dev:server' )
1919 expect ( pkg . scripts [ 'dev:server' ] ) . toBe ( 'bun --watch server/index.ts' )
20+ expect ( pkg . scripts [ 'dev:vite' ] ) . toBe ( 'vite' )
2021 expect ( pkg . scripts [ 'dev:all' ] ) . toBeUndefined ( )
2122 expect ( existsSync ( new URL ( 'scripts/dev.ts' , root ) ) ) . toBe ( true )
2223 expect ( existsSync ( new URL ( 'scripts/dev-all.ts' , root ) ) ) . toBe ( false )
2324
2425 const script = readSiteFile ( 'scripts/dev.ts' )
2526 // Spawns cms + vite without a recursive `bun run dev` call.
2627 expect ( script ) . toContain ( "bunCommand('--watch', 'server/index.ts')" )
27- expect ( script ) . toContain ( "bunRunCommand('vite', '--host', '127.0.0.1'" )
28+ expect ( script ) . toContain ( "bunRunCommand('dev: vite', '--host', '127.0.0.1'" )
2829 expect ( script ) . not . toContain ( 'command: `vite' )
2930 expect ( script ) . not . toContain ( 'command.split' )
3031 // Knows about the docker postgres host port.
@@ -49,18 +50,20 @@ describe('development workflow', () => {
4950 '--watch' ,
5051 'server/index.ts' ,
5152 ] )
52- expect ( bunRunCommand ( 'vite' , '--host' , '127.0.0.1' ) ) . toEqual ( [
53+ expect ( bunRunCommand ( 'dev: vite' , '--host' , '127.0.0.1' ) ) . toEqual ( [
5354 process . execPath ,
5455 'run' ,
55- 'vite' ,
56+ 'dev: vite' ,
5657 '--host' ,
5758 '127.0.0.1' ,
5859 ] )
5960
60- expect ( devScript ) . toContain ( "bunRunCommand('vite', '--host', '127.0.0.1'" )
61+ expect ( devScript ) . toContain ( "bunRunCommand('dev:vite', '--host', '127.0.0.1'" )
62+ expect ( devScript ) . not . toContain ( "bunRunCommand('vite'" )
6163 expect ( devScript ) . not . toContain ( 'command: `vite' )
6264 expect ( devScript ) . not . toContain ( 'command.split' )
63- expect ( e2eScript ) . toContain ( "bunRunCommand('vite', '--host', '127.0.0.1'" )
65+ expect ( e2eScript ) . toContain ( "bunRunCommand('dev:vite', '--host', '127.0.0.1'" )
66+ expect ( e2eScript ) . not . toContain ( "bunRunCommand('vite'" )
6467 expect ( e2eScript ) . not . toContain ( "['vite'" )
6568 expect ( e2eScript ) . not . toContain ( "['bun'" )
6669 expect ( startScript ) . toContain ( "bunRunCommand('build')" )
0 commit comments