import { isFakeHistoryType, getHistoryLinkCurve } from './helpers';
import { HistoryChangeTypes } from '../types';
describe('helpers tests', function () {
    describe('getHistoryLinkCurve tests', function () {
        it('should return correct curve if x < toX and y < toY', function () {
            expect(getHistoryLinkCurve(10, 10, 25, 25)).toBe('M10 10 L13 10 c 6 0 12 6 12 12 L25 25');
        });
        it('should return correct curve if x < toX and y > toY', function () {
            expect(getHistoryLinkCurve(10, 25, 25, 10)).toBe('M10 25 L13 25 c 6 0 12 -6 12 -12 L25 10');
        });
        it('should return correct curve if x > toX and y < toY', function () {
            expect(getHistoryLinkCurve(25, 10, 10, 25)).toBe('M25 10 L22 10 c -6 0 -12 6 -12 12 L10 25');
        });
        it('should return correct curve if x > toX and y > toY', function () {
            expect(getHistoryLinkCurve(25, 25, 10, 10)).toBe('M25 25 L22 25 c -6 0 -12 -6 -12 -12 L10 10');
        });
    });
    describe('isFakeHistoryType tests', function () {
        it('should return correct result', function () {
            expect(isFakeHistoryType(HistoryChangeTypes.FAKE_FILTERED_INCOMING)).toBe(true);
            expect(isFakeHistoryType(HistoryChangeTypes.FAKE_FILTERED_OUTGOING)).toBe(true);
            expect(isFakeHistoryType(HistoryChangeTypes.ENTITY_CHANGED)).toBe(false);
            expect(isFakeHistoryType('test')).toBe(false);
            expect(isFakeHistoryType(undefined)).toBe(false);
        });
    });
});
