UNPKG

@fgv/ts-utils-jest

Version:

Custom matchers for ts-utils result class

17 lines 564 B
import { Result } from '@fgv/ts-utils'; declare global { namespace jest { interface Matchers<R, T> { /** * Use .toSucceedAndMatchSnapshot to verify that a Result<T> is a success * and that the result value matches a stored snapshot */ toSucceedAndMatchSnapshot<T>(): R; } } } declare const _default: { toSucceedAndMatchSnapshot: <T>(this: jest.MatcherContext, received: Result<T>) => jest.CustomMatcherResult; }; export default _default; //# sourceMappingURL=index.d.ts.map