mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
14 lines
291 B
TypeScript
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);
|
|
});
|