jest-schema-matcher
v1.8.0
Published
[](https://badge.fury.io/js/jest-schema-matcher)  [ => {
const object = {
username: 'test_user_a124',
password: 'fixtures_password',
}
expect(object).toMatchSchema('schemaName')
/**
* 1. If SHOULD_UPDATE_SCHEMAS === true:
* Will create a new schema or update existing schema in same path as test file.
* E.g. If test path is `.../__tests__/sample.tests.js`
* Then schema will be created in `.../__tests__/schemas/schemaName.json`
* --or--
* If SHOULD_UPDATE_SCHEMAS === false:
* Will infer a new schema and recommend schema changes if the saved schema could be improved.
*/
/** 2. Will validate `object` against saved schema.*/
})