1 | "use strict";
|
2 |
|
3 | var _recompose = require("recompose");
|
4 |
|
5 | var _dataReductions = require("./data-reductions");
|
6 |
|
7 | test('addData', function () {
|
8 | var dataState = {
|
9 | foo: 'foo'
|
10 | };
|
11 | expect((0, _dataReductions.addData)(dataState, {
|
12 | bar: 'bar'
|
13 | })).toEqual({
|
14 | foo: 'foo',
|
15 | bar: 'bar'
|
16 | });
|
17 | expect((0, _recompose.compose)((0, _dataReductions.addData)({
|
18 | bar: 'bar'
|
19 | }))(dataState)).toEqual({
|
20 | foo: 'foo',
|
21 | bar: 'bar'
|
22 | });
|
23 | });
|
24 | test('clearData', function () {
|
25 | var dataState = {
|
26 | foo: 'foo'
|
27 | };
|
28 | expect((0, _dataReductions.clearData)()).toEqual({});
|
29 | expect((0, _dataReductions.clearData)(dataState)).toEqual({});
|
30 | expect((0, _recompose.compose)(_dataReductions.clearData)(dataState)).toEqual({});
|
31 | }); |
\ | No newline at end of file |