Skip to content

SyncDependencies

Everything the sync does to the outside world, so a test can stand a fixture in for it.

Import:

import type { SyncDependencies } from '@mnaoumov/typescript-dev-toolkit/upstream-sync';

Signature:

export interface SyncDependencies

Properties

PropertyTypeDescription
exec(file: string, arguments_: readonly string[], env?: Readonly<Record<string, string>>) => CommandResultRuns an executable with arguments and no shell.
fetchJson(url: string) => Promise<unknown>GETs a URL and parses the JSON it returns, throwing on an HTTP error.
log(text: string) => void
shell(command: string, env?: Readonly<Record<string, string>>) => CommandResultRuns a command line through the shell: a handler or a verify command.

Links to this page: