Skip to content

Commit b6589e2

Browse files
committed
test: ensure LengthFieldValidation not returns if validation succeds with larger than the minimum length
1 parent ab69b20 commit b6589e2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/validation/validators/length-field-validation.spec.ts

+13
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,17 @@ describe('Length Field Validation', () => {
2121
});
2222
expect(error).toBeNull();
2323
});
24+
25+
test('Should not return if validation succeds with larger than the minimum length', () => {
26+
const sut = makeSut();
27+
const error = sut.validate({
28+
[field]: [
29+
faker.random.word(),
30+
faker.random.word(),
31+
faker.random.word(),
32+
faker.random.word(),
33+
],
34+
});
35+
expect(error).toBeNull();
36+
});
2437
});

0 commit comments

Comments
 (0)