IF Commons GitHub

runners/file/mod

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

The file runner (0005-grc-runners FR-005), for files and configuration: the input is { path, format, select? }, the file is read by a reader the host gives, decoded as json, lines or text, and a value is selected by a JSON pointer (RFC 6901). A file that is not there is a problem, not a value.

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

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

FileReadertypeno test imports it
type FileReader = { read(path: string): Promise<string | undefined> };

What the host gives: the text of a file, or undefined where there is none.

selectPointerfunction
function selectPointer(value: Json, pointer: string): Result<Json, string>

The value a JSON pointer names in value, or why it names none.

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

fileRunnerfunction
function fileRunner(reader: FileReader): Runner

The file runner over a reader.

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

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