UNPKG

1.05 kBJavaScriptView Raw
1"use strict";
2
3var _recompose = require("recompose");
4
5var _envReductions = require("./env-reductions");
6
7test('disableIsServerRenderReduction', function () {
8 var envState = {
9 foo: 'foo',
10 isServerRender: true
11 };
12 expect((0, _envReductions.disableIsServerRenderReduction)()(envState)).toEqual({
13 foo: 'foo',
14 isServerRender: false
15 });
16});
17test('onlineReduction', function () {
18 var envState = {
19 foo: 'foo',
20 isOnline: false
21 };
22 expect((0, _envReductions.onlineReduction)()(envState)).toEqual({
23 foo: 'foo',
24 isOnline: true
25 });
26 expect((0, _recompose.compose)((0, _envReductions.onlineReduction)())(envState)).toEqual({
27 foo: 'foo',
28 isOnline: true
29 });
30});
31test('offlineReduction', function () {
32 var envState = {
33 foo: 'foo',
34 isOnline: true
35 };
36 expect((0, _envReductions.offlineReduction)()(envState)).toEqual({
37 foo: 'foo',
38 isOnline: false
39 });
40 expect((0, _recompose.compose)((0, _envReductions.offlineReduction)())(envState)).toEqual({
41 foo: 'foo',
42 isOnline: false
43 });
44});
\No newline at end of file