diff options
| author | taehoon <th.dev91@gmail.com> | 2019-07-25 08:03:41 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-07-25 08:03:41 -0400 |
| commit | 65ef03931661561db0791ee7d560292dda6b7d48 (patch) | |
| tree | 0ad8fe6c512aa6161aa82ea168670ee3d77cfd63 /test/unit/specs/components | |
| parent | 53c9517a4aeae1158a95e3b9c6d6d89e3a7e0ee9 (diff) | |
add unit test for elimination logic
Diffstat (limited to 'test/unit/specs/components')
| -rw-r--r-- | test/unit/specs/components/timeline.spec.js | 17 |
1 files changed, 17 insertions, 0 deletions
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 |
