From 5864dc52f7144d230b8d8613723f6eb03be28f10 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 20 Feb 2022 00:43:38 +0200 Subject: [PATCH] removed file because that logic has been removed --- test/unit/specs/components/timeline.spec.js | 27 --------------------- 1 file changed, 27 deletions(-) delete mode 100644 test/unit/specs/components/timeline.spec.js diff --git a/test/unit/specs/components/timeline.spec.js b/test/unit/specs/components/timeline.spec.js deleted file mode 100644 index 0c8674a8..00000000 --- a/test/unit/specs/components/timeline.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -import { getExcludedStatusIdsByPinning } from 'src/components/timeline/timeline.js' - -describe('Timeline', () => { - describe('getExcludedStatusIdsByPinning', () => { - const mockStatuses = (ids) => ids.map(id => ({ id })) - - it('should return only members of both pinnedStatusIds and ids of the given statuses', () => { - const statusIds = [1, 2, 3, 4] - const statuses = mockStatuses(statusIds) - const pinnedStatusIds = [1, 3, 5] - const result = getExcludedStatusIdsByPinning(statuses, pinnedStatusIds) - result.forEach(item => { - expect(item).to.be.oneOf(statusIds) - expect(item).to.be.oneOf(pinnedStatusIds) - }) - }) - - it('should return ids of pinned statuses not posted before any unpinned status', () => { - const pinnedStatusIdSet1 = ['PINNED1', 'PINNED2'] - const pinnedStatusIdSet2 = ['PINNED3', 'PINNED4'] - const pinnedStatusIds = [...pinnedStatusIdSet1, ...pinnedStatusIdSet2] - const statusIds = [...pinnedStatusIdSet1, 'UNPINNED1', ...pinnedStatusIdSet2] - const statuses = mockStatuses(statusIds) - expect(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds)).to.eql(pinnedStatusIdSet1) - }) - }) -})