IF Commons GitHub

runners/api/mod

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-grc-runners FR-006

The api runner (0005-grc-runners FR-006): the input is { method, url, select? } with GET or HEAD only; the call is made by a client the host gives, of the shape { fetch({ method, url }) -> { status, body } }, and the value is { status, body } or what a JSON pointer selects from it.

Source: commons/grc/src/runners/api/mod.ts

1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

ApiClienttypeno test imports it
type ApiClient = { fetch(request: { readonly method: "GET" | "HEAD"; readonly url: string }): Promise<{ readonly status: number; readonly body: Json }> };

What the host gives.

apiRunnerfunction
function apiRunner(client: ApiClient): Runner

The api runner over a client.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.