import { themis } from '~/main'; import { doManyTests } from '~/tests/integration/helpers'; describe('Themis - Schema with Object Tests', () => { const schema = themis.object({ required: true, shape: { value: themis.number({ min: 10, max: 20, }), }, }); const testMany = doManyTests(schema); testMany.valid([{}, { value: null }, { value: 10 }, { value: 15 }, { value: 20 }]); testMany.invalid([undefined, null, { value: 25 }]); });