DefinitelyTyped/types/jest-json-schema/index.d.ts
Tony Hallett 9e6921fcd9 jest updated - corrected Matchers, added ExtendedExpect (#39243)
* corrected Matchers, added ExtendedExpect

* Matchers<R,T>

* updating dependent packages

* refactor and additional getState/setState/matcher context

* MatcherContext

* Matchers<R, T> for jest-axe
2019-10-25 13:12:50 -07:00

22 lines
734 B
TypeScript

// Type definitions for jest-json-schema 2.1
// Project: https://github.com/americanexpress/jest-json-schema#readme
// Definitions by: Igor Korolev <https://github.com/deadNightTiger>
// Matt Scheurich <https://github.com/lvl99>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
/// <reference types="jest" />
import * as ajv from 'ajv';
declare global {
namespace jest {
interface Matchers<R, T> {
toBeValidSchema(): R;
toMatchSchema(schema: object): R;
}
}
}
export const matchers: jest.ExpectExtendMap;
export function matchersWithOptions(options: ajv.Options, extendAjv?: (ajv: ajv.Ajv) => void): jest.ExpectExtendMap;