import { IMAGE_EDITOR_FILTERS, ImageEditorImageInterface, } from './../../../models/index'; import { getInvertedFilters, } from './image-editor-image.functions'; describe('getInvertedFilters', () => { // tslint:disable-next-line test('Returns the inverted string if the imageEditorImage has no filters', () => { const imageEditorImage = {} as ImageEditorImageInterface; const result = getInvertedFilters(imageEditorImage); expect(result).toBe(IMAGE_EDITOR_FILTERS.INVERTED); }); // tslint:disable-next-line test('Returns an empty string if the filters include the inverted string', () => { const imageEditorImage = { filters: IMAGE_EDITOR_FILTERS.INVERTED, } as ImageEditorImageInterface; const result = getInvertedFilters(imageEditorImage); expect(result).toBe(''); }); // tslint:disable-next-line test('Returns the inverted string value if the filters do not include the inverted string', () => { const imageEditorImage = { filters: '', } as ImageEditorImageInterface; const result = getInvertedFilters(imageEditorImage); expect(result).toBe(IMAGE_EDITOR_FILTERS.INVERTED); }); });