aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-07-25 23:34:56 -0400
committertaehoon <th.dev91@gmail.com>2019-07-25 23:34:56 -0400
commitd785ed5a05b3123d95e8627a0f82f0f9cddec33f (patch)
treeb27cefc2ee05061522ddfa8e1a163a6e4f20cc3a
parenta443a5203e19eb43cdff76b1e3e6502a5b917bc9 (diff)
rewrite unit tests
-rw-r--r--test/unit/specs/components/timeline.spec.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/specs/components/timeline.spec.js b/test/unit/specs/components/timeline.spec.js
index 48796cd3..c1fdd0dd 100644
--- a/test/unit/specs/components/timeline.spec.js
+++ b/test/unit/specs/components/timeline.spec.js
@@ -1,5 +1,4 @@
import { getExcludedStatusIdsByPinning } from 'src/components/timeline/timeline.js'
-import { difference } from 'lodash'
describe('Timeline', () => {
describe('getExcludedStatusIdsByPinning', () => {
@@ -8,14 +7,14 @@ describe('Timeline', () => {
it('should not return any unpinned status ids', () => {
const statuses = mockStatuses([1, 2, 3, 4])
const pinnedStatusIds = [1, 3, 5]
- expect(difference(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds), pinnedStatusIds)).to.eql([])
+ expect(pinnedStatusIds).to.include.members(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds))
})
it('should not return any status ids not listed in the given statuses', () => {
const statusIds = [1, 2, 3, 4]
const statuses = mockStatuses(statusIds)
const pinnedStatusIds = [1, 3, 5]
- expect(difference(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds), statusIds)).to.eql([])
+ expect(statusIds).to.include.members(getExcludedStatusIdsByPinning(statuses, pinnedStatusIds))
})
it('should return ids of pinned statuses not posted before any unpinned status', () => {