import { expectResult, getMakeSut, getAnyObject } from './helpers'; describe('Integration - Object Tests', () => { const makeSut = getMakeSut('object'); describe('if no rules are set, should allow all kinds of objects', () => { const cases = getAnyObject(); cases.forEach(testCase => { const name = testCase ? JSON.stringify(testCase) : String(testCase); test(`should allow [ ${name} ]`, () => { const { sut } = makeSut(); const result = sut.validate(testCase); expectResult(result).toBeValid(); }); }); }); });