Skip to content

Commit 4b70bcd

Browse files
ghetolaymhevery
authored andcommitted
test(forms): Better description and coverage for angular#19256 (angular#21652)
fixes angular#21575 PR Close angular#21652
1 parent 8baff18 commit 4b70bcd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/forms/test/validators_spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,16 @@ import {map} from 'rxjs/operator/map';
271271
it('should not error on "undefined" pattern',
272272
() => expect(Validators.pattern(undefined !)(new FormControl('aaAA'))).toBeNull());
273273

274-
it('should work with string containing line boundary',
274+
it('should work with pattern string containing both boundary symbols',
275275
() => expect(Validators.pattern('^[aA]*$')(new FormControl('aaAA'))).toBeNull());
276276

277-
it('should work with string not containing line boundary',
277+
it('should work with pattern string containing only start boundary symbols',
278+
() => expect(Validators.pattern('^[aA]*')(new FormControl('aaAA'))).toBeNull());
279+
280+
it('should work with pattern string containing only end boundary symbols',
281+
() => expect(Validators.pattern('[aA]*$')(new FormControl('aaAA'))).toBeNull());
282+
283+
it('should work with pattern string not containing any boundary symbols',
278284
() => expect(Validators.pattern('[aA]*')(new FormControl('aaAA'))).toBeNull());
279285
});
280286

0 commit comments

Comments
 (0)