improvement(setup): complete knowledge and update flows (#6521)

This commit is contained in:
Theodore Li
2026-08-10 23:38:47 -04:00
committed by GitHub
parent daac4f38d4
commit 5478a690cc
15 changed files with 219 additions and 25 deletions
+14
View File
@@ -0,0 +1,14 @@
import { describe, expect, it } from 'bun:test'
import { getComposeUpdateMode, isLifecycleCommand } from './lifecycle.ts'
describe('setup lifecycle', () => {
it('recognizes update as a lifecycle command', () => {
expect(isLifecycleCommand('update')).toBe(true)
})
it('pulls published installs and rebuilds source installs', () => {
expect(getComposeUpdateMode('/repo/docker-compose.prod.yml')).toBe('pull')
expect(getComposeUpdateMode('/repo/docker-compose.local.yml')).toBe('build')
expect(() => getComposeUpdateMode('/repo/compose.yml')).toThrow(/Unsupported Sim Compose file/)
})
})