v1.1.0: pooled runtime, 959 tests, production hardening (0 squash)

This commit is contained in:
John Dvorak
2025-08-15 10:00:00 -07:00
commit 92deb689cd
321 changed files with 79170 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// Quantifier combinators for compositional expectations
// all(), any(), none() wrap multiple assertions into quantified groups.
import type { FluentAssertion, FluentRelation } from './fluent.js'
export type ComposableAssertion = FluentAssertion | FluentRelation
export interface QuantifiedGroup {
kind: 'all' | 'any' | 'none'
assertions: ComposableAssertion[]
}
/** Every assertion in the group must hold. */
export function all(...assertions: ComposableAssertion[]): QuantifiedGroup {
return { kind: 'all', assertions }
}
/** At least one assertion in the group must hold. */
export function any(...assertions: ComposableAssertion[]): QuantifiedGroup {
return { kind: 'any', assertions }
}
/** No assertion in the group may hold. */
export function none(...assertions: ComposableAssertion[]): QuantifiedGroup {
return { kind: 'none', assertions }
}