Closed tlbdk closed 3 years ago
Example:
describe.each([false, true])('Common (optimize: %s)', optimize => { describe('ValidatorBase', () => { it(`should validate with the default codeGen implementation with optimize ${optimize}`, () => { const validator = new OneValidator({ optimize: optimize }) expect(validator.validate(1)).toStrictEqual([]) expect(validator.validate(2)).toStrictEqual([new ValidationFailure(`value is not 1`)]) expect(validator.validate(null)).toStrictEqual([new RequiredFail(`Is required`)]) }) }) })
thanks for this contribution, i will create a new version soon
release in version 0.4.33
Example: