UNPKG

cli-testing-library

Version:

Simple and complete CLI testing utilities that encourage good testing practices.

17 lines (16 loc) 554 B
export interface CLITestingLibraryMatchers<TReturn> { /** * @description * Assert whether a query is present in the console or not. * @example * expect(queryByText('Hello world')).toBeInTheDocument() */ toBeInTheConsole: () => TReturn; /** * @description * Check whether the given instance has a stderr message or not. * @example * expect(instance).toHaveErrorMessage(/command could not be found/i) // to partially match */ toHaveErrorMessage: (checkWith?: string | RegExp) => TReturn; }