test(ST-cmovhvef3): add exhaustive re-grill canTransition test covering PLANNED
Adds a loop test that asserts canTransition(status, 'GRILLING') for all statuses in GRILL_TRIGGERABLE_FROM that support the transition, explicitly documenting PLANNED as a valid re-grill entry point.
This commit is contained in:
parent
b6447f27f1
commit
9a04dc3a31
1 changed files with 8 additions and 0 deletions
|
|
@ -59,6 +59,14 @@ describe('canTransition', () => {
|
|||
expect(canTransition('PLANNED', 'DRAFT')).toBe(false)
|
||||
})
|
||||
|
||||
it('canTransition to GRILLING from all statuses that allow re-grill', () => {
|
||||
// DRAFT, GRILLED, GRILL_FAILED, PLANNED are in GRILL_TRIGGERABLE_FROM and support the transition.
|
||||
const regrill = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLANNED'] as const
|
||||
for (const status of regrill) {
|
||||
expect(canTransition(status, 'GRILLING')).toBe(true)
|
||||
}
|
||||
})
|
||||
|
||||
it('rejects invalid jumps', () => {
|
||||
expect(canTransition('DRAFT', 'PLANNED')).toBe(false)
|
||||
expect(canTransition('DRAFT', 'PLAN_READY')).toBe(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue