Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit d6f3f2a

Browse files
committed
actions.xor add missing item test
1 parent f1693cf commit d6f3f2a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/actions-spec.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ describe('model action creators', () => {
6565

6666
fn(dispatch, getState);
6767
});
68+
69+
it('should change a collection by pushing an item to it via symmetric difference', done => {
70+
const fn = actions.xor('foo.bar', 4);
71+
const dispatch = action => {
72+
done(assert.deepEqual(
73+
action.value,
74+
[1, 2, 3, 4]));
75+
};
76+
const getState = () => ({
77+
foo: {
78+
bar: [1, 2, 3],
79+
},
80+
});
81+
82+
fn(dispatch, getState);
83+
});
6884
});
6985

7086
describe('actions.push() thunk', () => {

0 commit comments

Comments
 (0)