mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
15 lines
612 B
TypeScript
15 lines
612 B
TypeScript
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/)
|
|
})
|
|
})
|