UNPKG

726 BJavaScriptView Raw
1"use strict";
2
3var _recompose = require("recompose");
4
5var _dataReductions = require("./data-reductions");
6
7test('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});
24test('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