import faker from 'faker'; import { doManyTests } from '~/tests/integration/helpers'; import { getMakeSut } from '~/tests/integration/helpers/make-sut'; describe('themis.custom.uuid tests', () => { const makeSut = getMakeSut.customFormat('uuid', { required: true }); const { sut } = makeSut({}); const testMany = doManyTests(sut); testMany.valid(new Array(5).fill('').map(faker.datatype.uuid)); testMany.invalid([ undefined, null, 'batata', '415e93c7.12b4.408e.854a.ca16d2b92c50', '415e93c7-12b4-408e-854a-ca16d2b92c5', ]); });