mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
12 lines
587 B
TypeScript
12 lines
587 B
TypeScript
import { removeEmptyStringFields } from 'utils/removeEmptyStringFields';
|
|
|
|
test('removeEmptyStringFields', () => {
|
|
expect(removeEmptyStringFields({})).toEqual({});
|
|
expect(removeEmptyStringFields({ a: undefined })).toEqual({ a: undefined });
|
|
expect(removeEmptyStringFields({ a: 0 })).toEqual({ a: 0 });
|
|
expect(removeEmptyStringFields({ a: 1 })).toEqual({ a: 1 });
|
|
expect(removeEmptyStringFields({ a: '1' })).toEqual({ a: '1' });
|
|
expect(removeEmptyStringFields({ a: '' })).toEqual({});
|
|
expect(removeEmptyStringFields({ a: '', b: '2' })).toEqual({ b: '2' });
|
|
});
|