test(forms): added missing selfOnly tests (#12317)
This commit is contained in:

committed by
Igor Minar

parent
a5419608e0
commit
15fc5dd7ee
@ -429,6 +429,12 @@ export function main() {
|
||||
expect(c.value).toBe('initial value');
|
||||
});
|
||||
|
||||
it('should not set the parent when explicitly specified', () => {
|
||||
const g = new FormGroup({'one': c});
|
||||
c.patchValue('newValue', {onlySelf: true});
|
||||
expect(g.value).toEqual({'one': 'initial value'});
|
||||
});
|
||||
|
||||
it('should reset to a specific value if passed with boxed value', () => {
|
||||
c.setValue('new value');
|
||||
expect(c.value).toBe('new value');
|
||||
|
Reference in New Issue
Block a user