UNPKG

@cowwoc/requirements

Version:

A fluent API for enforcing design contracts with automatic message generation.

39 lines (38 loc) 1.37 kB
/** * The result of calculating the difference between two strings. */ declare class DiffResult { private readonly actualLines; private readonly diffLines; private readonly expectedLines; private readonly equalLines; /** * @param actualLines - the lines of the actual string * @param diffLines - the difference between the actual and expected values (empty list if omitted) * @param expectedLines - the lines of the expected string * @param equalLines - indicates if the actual and expected values are equal for each line * @throws TypeError if any of the arguments are `undefined` or `null` */ constructor(actualLines: string[], diffLines: string[], expectedLines: string[], equalLines: boolean[]); /** * @returns the lines of the actual string */ getActualLines(): string[]; /** * @returns the difference between "Actual" and "Expected". If the list is empty, no lines should be * displayed. */ getDiffLines(): string[]; /** * Returns the lines of the expected string. * * @returns the lines of the expected string */ getExpectedLines(): string[]; /** * @returns a list that indicates whether the actual and expected values are equal on each line */ getEqualLines(): boolean[]; toString(): string; } export { DiffResult };