logical.Judgementtypeno test imports ittype Judgement = { readonly status: "pass" | "fail" | "error"; readonly reason: string };What an expectation says of an observation.
Judging what a runner observed against what a check expects, and joining statuses (0003-grc-logical FR-001, FR-003): pure functions over JSON data.
import { evaluate, join } from "./evaluate.ts";
evaluate({ kind: "empty" }, []); // { status: "pass", reason: "no rows, as expected" }
join("fail", "pass"); // "fail"logical.Judgementtypeno test imports ittype Judgement = { readonly status: "pass" | "fail" | "error"; readonly reason: string };What an expectation says of an observation.
logical.joinfunctionno test imports itfunction join(a: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn", b: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"): "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"The more serious of two statuses: associative, commutative and idempotent, with not-applicable its identity.
logical.joinAllfunctionno test imports itfunction joinAll(statuses: readonly ("accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn")[]): "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"The join of statuses; not-applicable for none.
logical.evaluatefunctionno test imports itfunction evaluate(expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/… (1776 characters)function evaluate(expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"non-empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"equals">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"count">; }, { min: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; max: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; }> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"every">; field: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<string>; op: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>>, observed: Json): JudgementThe judgement of an observed value against an expectation: error where the observation is not the shape the expectation needs.
Judgementtypeno test imports ittype Judgement = { readonly status: "pass" | "fail" | "error"; readonly reason: string };What an expectation says of an observation.
joinfunctionfunction join(a: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn", b: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"): "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"The more serious of two statuses: associative, commutative and idempotent, with not-applicable its identity.
joinAllfunctionfunction joinAll(statuses: readonly ("accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn")[]): "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"The join of statuses; not-applicable for none.
evaluatefunctionfunction evaluate(expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/… (1776 characters)function evaluate(expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"non-empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"equals">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"count">; }, { min: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; max: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; }> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"every">; field: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<string>; op: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>>, observed: Json): JudgementThe judgement of an observed value against an expectation: error where the observation is not the shape the expectation needs.