aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/components
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-02-20 00:43:38 +0200
committerHenry Jameson <me@hjkos.com>2022-02-20 00:43:38 +0200
commit5864dc52f7144d230b8d8613723f6eb03be28f10 (patch)
tree5ca445e9e84f226e05934b56dd9e73b7c8789c77 /test/unit/specs/components
parenta31ff20f50906f70253bf43f4548c0f5b0ab8db4 (diff)
removed file because that logic has been removed
Diffstat (limited to 'test/unit/specs/components')
-rw-r--r--test/unit/specs/components/timeline.spec.js27
1 files changed, 0 insertions, 27 deletions
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)
- })
- })
-})