diff --git a/test/set-items.ut.js b/test/set-items.ut.js index bee63f9..6885706 100644 --- a/test/set-items.ut.js +++ b/test/set-items.ut.js @@ -11,16 +11,19 @@ import { iterable, expectExactlySameMembers } from './helper' describe('setItems - updating the list of selectable items', () => { - it('should remove items from selection that don\'t exist anymore', () => { - const state = init() + describe('remove selected items', () => { + it('should remove items from selection that don\'t exist anymore', () => { + const state = init() - const newState = flow( - setItems(iterable(['A', 'B', 'C', 'D'])), - setSelection(['B', 'C']), - setItems(iterable(['A', 'C', 'D'])) - )(state) + const newState = flow( + setItems(iterable(['A', 'B', 'C', 'D'])), + setSelection(['B', 'C']), + setItems(iterable(['A', 'C', 'D'])) + )(state) + + expectExactlySameMembers(getSelection(newState), ['C']) + }) - expectExactlySameMembers(getSelection(newState), ['C']) }) it('should remove item from anchor that doesn\'t exist anymore', () => {