Function: defineExpectation()

August 8, 2026 · View on GitHub

@plures/praxis


@plures/praxis / index / defineExpectation

Function: defineExpectation()

defineExpectation(exp): LifecycleExpectation

Defined in: src/lifecycle/expectation.ts:149

Shorthand — create expectation from a plain object.

Parameters

exp

LifecycleExpectation

The expectation object with required fields: id, type, title, description

Returns

LifecycleExpectation

A validated and normalized LifecycleExpectation

Example

const fix = defineExpectation({
  id: 'fix-login-redirect',
  type: 'fix',
  title: 'Fix login redirect loop',
  description: 'Users get stuck in redirect loop after OAuth callback',
  priority: 'critical',
  acceptance: ['Login completes without redirect loop'],
});