From 1dec9525213de7b8c23bf3393b2b76a46e27f6c7 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Tue, 1 Aug 2023 16:22:54 -0500 Subject: remove src/protein/ --- src/protein/protein.test.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/protein/protein.test.js (limited to 'src/protein/protein.test.js') diff --git a/src/protein/protein.test.js b/src/protein/protein.test.js deleted file mode 100644 index 61c4896..0000000 --- a/src/protein/protein.test.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -import { compare } from './protein'; - -test('compare size-1 proteins', () => { - expect(compare([0], [0])).toBe(1); - expect(compare([0], [1])).toBe(0); - expect(compare([1], [0])).toBe(0); - expect(compare([1], [1])).toBe(1); -}); - - -test('compare larger proteins', () => { - expect(compare([0,0], [0,0])).toBe(1); - expect(compare([1,1], [1,1])).toBe(1); - expect(compare([0,1], [1,1])).toBeCloseTo(0.5); - expect(compare([0,1,0], [1,1,1])).toBeCloseTo(1/3); - expect(compare([0,1,0,1], [1,1,1,1])).toBeCloseTo(0.5); - expect(compare([0,1,0,1], [0,1,1,1])).toBeCloseTo(0.75); - expect(compare([0,1,0,1], [0,1,1,0])).toBeCloseTo(0.5); - expect(compare([0,1,0,0], [0,1,1,0])).toBeCloseTo(0.75); - expect(compare([0,1,1,0], [0,1,1,0])).toBeCloseTo(1); -}); - - -test('comparisons between differently-sized proteins throw', () => { - expect(() => compare([0], [0, 0])).toThrow(); - expect(() => compare([0, 0], [0])).toThrow(); -}); -- cgit v1.2.1