<commit_before><commit_msg>Add separator-tests<commit_after>import { SeparatorInterface }  from './separator.functions';

describe("Separator Resizing", () => {
	it("should return the correct flex-size", () => {
		{
			let result: [number, number] = SeparatorInterface.calc(100, 50, 100, 100, {
				prevEl: 1,
				nextEl: 1
			});

			expect(result[0]).toBe(0.5);
			expect(result[1]).toBe(1.5);
		}

		{
			let result: [number, number] = SeparatorInterface.calc(200, 100, 200, 100, {
				prevEl: 2,
				nextEl: 1
			});

			expect(result[0]).toBe(1);
			expect(result[1]).toBe(2);
		}
	});

	it("should return the max. flex-sizes when cursorEnd is outside the element", () => {
		{
			let result: [number, number] = SeparatorInterface.calc(100, -50, 100, 100, {
				prevEl: 1,
				nextEl: 1
			});

			expect(result[0]).toBe(0);
			expect(result[1]).toBe(2);
		}

		{
			let result: [number, number] = SeparatorInterface.calc(100, 250, 100, 100, {
				prevEl: 2,
				nextEl: 1
			});

			expect(result[0]).toBe(3);
			expect(result[1]).toBe(0);
		}
	});

});
{'fraction_non_alphanumeric': 0.18980169971671387, 'fraction_numerical': 0.0679886685552408, 'mean_word_length': 3.326530612244898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '393411', 'n_tokens_mistral': 507, 'n_tokens_neox': 389, 'n_words': 79}