Skip to content

Commit e82a0ef

Browse files
committed
fixup! feat(forms): support type set in form validators
1 parent 64065a1 commit e82a0ef

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

packages/forms/test/validators_spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -362,21 +362,21 @@ import {normalizeValidators} from '../src/validators';
362362
expect(Validators.maxLength(1)(new FormControl(value))).toEqual({
363363
'maxlength': {'requiredLength': 1, 'actualLength': 5},
364364
});
365+
});
365366

366-
it('should trigger validation for an object that contains numeric length property', () => {
367-
const value = {length: 5, someValue: [1, 2, 3, 4, 5]};
368-
expect(Validators.maxLength(10)(new FormControl(value))).toBeNull();
369-
expect(Validators.maxLength(1)(new FormControl(value))).toEqual({
370-
'maxlength': {'requiredLength': 1, 'actualLength': 5},
371-
});
367+
it('should trigger validation for an object that contains numeric length property', () => {
368+
const value = {length: 5, someValue: [1, 2, 3, 4, 5]};
369+
expect(Validators.maxLength(10)(new FormControl(value))).toBeNull();
370+
expect(Validators.maxLength(1)(new FormControl(value))).toEqual({
371+
'maxlength': {'requiredLength': 1, 'actualLength': 5},
372372
});
373+
});
373374

374-
it('should trigger validation for an object that contains numeric size property', () => {
375-
const value = new Set([1, 2, 3, 4, 5]);
376-
expect(Validators.maxLength(10)(new FormControl(value))).toBeNull();
377-
expect(Validators.maxLength(1)(new FormControl(value))).toEqual({
378-
'maxlength': {'requiredLength': 1, 'actualLength': 5},
379-
});
375+
it('should trigger validation for an object that contains numeric size property', () => {
376+
const value = new Set([1, 2, 3, 4, 5]);
377+
expect(Validators.maxLength(10)(new FormControl(value))).toBeNull();
378+
expect(Validators.maxLength(1)(new FormControl(value))).toEqual({
379+
'maxlength': {'requiredLength': 1, 'actualLength': 5},
380380
});
381381
});
382382

0 commit comments

Comments
 (0)