pleroma-fe/test/unit/specs/components/timeline.spec.js
2019-07-25 08:03:41 -04:00

17 lines
No EOL
528 B
JavaScript

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([])
})
})
})