DefinitelyTyped/types/jest-json-schema/jest-json-schema-tests.ts
2017-10-26 11:48:05 -07:00

14 lines
291 B
TypeScript

import { matchers } from 'jest-json-schema';
expect.extend(matchers);
it('validates my json', () => {
const schema = {
properties: {
hello: { type: 'string' },
},
required: ['hello'],
};
expect({ hello: 'world' }).toMatchSchema(schema);
});