1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
4 |
|
5 | var _compose = _interopRequireDefault(require("recompose/compose"));
|
6 |
|
7 | var _localReductions = require("./local-reductions");
|
8 |
|
9 | test('setLocalReduction', function () {
|
10 | var localState = {
|
11 | foo: 'foo'
|
12 | };
|
13 | expect((0, _localReductions.setLocalReduction)({
|
14 | bar: 'bar'
|
15 | })(localState)).toEqual({
|
16 | foo: 'foo',
|
17 | bar: 'bar'
|
18 | });
|
19 | expect((0, _compose.default)((0, _localReductions.setLocalReduction)({
|
20 | bar: 'bar'
|
21 | }))(localState)).toEqual({
|
22 | foo: 'foo',
|
23 | bar: 'bar'
|
24 | });
|
25 | });
|
26 | test('deleteLocalReduction', function () {
|
27 | var localState = {
|
28 | foo: 'foo',
|
29 | bar: 'bar'
|
30 | };
|
31 | expect((0, _localReductions.deleteLocalReduction)('bar')(localState)).toEqual({
|
32 | foo: 'foo'
|
33 | });
|
34 | expect((0, _compose.default)((0, _localReductions.deleteLocalReduction)('bar'))(localState)).toEqual({
|
35 | foo: 'foo'
|
36 | });
|
37 | }); |
\ | No newline at end of file |