UNPKG

featuretoggle-react

Version:

Library to use Feature Toggles of your choice in a React application

26 lines (23 loc) 595 B
"use strict"; var _reducer = require("./reducer"); var _actions = require("./actions"); describe('featureToggleReducer', function () { it('upodates state with featureToggle payload', function () { var action = { type: _actions.UPDATE_FEATURE_TOGGLE, payload: { features: { feature1: true, feature2: false } } }; var updatedState = (0, _reducer.featureToggleReducer)(_reducer.initialState, action); expect(updatedState).toEqual({ features: { feature1: true, feature2: false } }); }); });