interface TestEnvironment { fetch: typeof globalThis.fetch } interface TestTargetResult { type?: "TestResult" outcome: Outcome name: string pointer: Pointer } export interface TestResult < Input=unknown, Outcome=unknown, Pointer=unknown, > { type?: "TestResult" info?: string outcome: Outcome source?: TestTargetResult } export interface TestCase< Input=unknown, Outcome=unknown, > { applicability?: string // https://www.w3.org/TR/act-rules-format/#applicability assumptions?: string // https://www.w3.org/TR/act-rules-format/#assumptions attributedTo?: Array description: string expectations?: string // https://www.w3.org/TR/act-rules-format/#expectations failedCases?: Iterable> inapplicableCases?: Iterable> input: { [I in keyof Input]: InputDescription} isPartOf?: Iterable markdown?: string name: string passedCases?: Iterable> requirementReference?: Iterable<{ id: URL, url?: URL }> run: (inputs: Input, env?: TestEnvironment) => Promise> slug: string testCases?: Iterable> url: URL uuid: string } interface InputDescription { help: string required?: boolean default?: unknown type?: string | string[] rangeIncludes?: string[] constraints?: unknown[] } interface TestCaseExample < Input=unknown, Outcome=unknown, > { name: string id?: string input: Input result: TestResult targets?: unknown }