mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
651 B
26 lines
651 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { StringFormControl } from './string-form-control';
|
|
|
|
describe('StringFormControl', () => {
|
|
it('should convert empty string to undefined', () => {
|
|
const formControl = new StringFormControl();
|
|
|
|
formControl.setValue('');
|
|
|
|
expect(formControl.value).toBeUndefined();
|
|
});
|
|
|
|
it('should convert empty string to undefined when patching', () => {
|
|
const formControl = new StringFormControl();
|
|
|
|
formControl.patchValue('');
|
|
|
|
expect(formControl.value).toBeUndefined();
|
|
});
|
|
});
|