From 65ef03931661561db0791ee7d560292dda6b7d48 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 25 Jul 2019 08:03:41 -0400
Subject: add unit test for elimination logic
---
test/unit/specs/components/timeline.spec.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 test/unit/specs/components/timeline.spec.js
(limited to '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
new file mode 100644
index 00000000..b13d3e20
--- /dev/null
+++ b/test/unit/specs/components/timeline.spec.js
@@ -0,0 +1,17 @@
+import { getExcludedStatusIdsByPinning } from 'src/components/timeline/timeline.js'
+import { difference } from 'lodash'
+
+describe('Timeline', () => {
+ describe('getExcludedStatusIdsByPinning', () => {
+ it('should not return unpinned status ids', () => {
+ const statuses = [
+ { id: 1 },
+ { id: 2 },
+ { id: 3 },
+ { id: 4 }
+ ]
+ const pinnedStatusIds = [1, 3]
+ expect(difference(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds), pinnedStatusIds)).to.eql([])
+ })
+ })
+})
\ No newline at end of file
--
cgit v1.2.3-70-g09d2