UNPKG

checksync

Version:

A tool that allows code to be annotated across different files to ensure they remain in sync.

41 lines (40 loc) 1.45 kB
export declare enum Scenario { Autofix = "autofix", CheckOnly = "check-only", JsonCheckOnly = "json-check-only" } export declare const EXAMPLES_DIR: string; export declare const TESTOUTPUT_DIR: string; /** * Get the examples from the `__examples__` folder. * * @returns The list of example directories. */ export declare const getExamples: () => string[]; /** * Run checksync for an example. * * @param example The glob or folder that represents the example being run. * @param scenario The scenario to run. * @returns A promise of the verbose logs from the run. */ export declare const runChecksync: (example: string, scenario?: Scenario) => Promise<string>; /** * Write the log to disk for an example. * * @param example The example being written. * @param scenario The scenario being written. * @param log The log to write. * @returns A promise of the file path written that resolves when the log is * written. */ export declare const writeLog: (example: string, scenario: Scenario | undefined, log: string) => Promise<string>; /** * Read the log from disk for an example scenario. * * @param example The example being read. * @param scenario The scenario being read. * @returns A promise of the log that resolves when the log is read. The * promise will resolve to null if the log does not exist. */ export declare const readLog: (example: string, scenario: Scenario | undefined) => Promise<string | null>;