add unit test for elimination logic
This commit is contained in:
parent
53c9517a4a
commit
65ef039316
2 changed files with 34 additions and 11 deletions
17
test/unit/specs/components/timeline.spec.js
Normal file
17
test/unit/specs/components/timeline.spec.js
Normal file
|
@ -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([])
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue