redux-testkit
Advanced tools
Comparing version 0.1.21 to 0.1.22
'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.default= | ||
function(reducer,state){ | ||
@@ -21,3 +28,3 @@ var initialState=state||reducer(undefined,{}); | ||
toChangeInState:function toChangeInState(expectedChanges){ | ||
var expected=_lodash2.default.merge({},originalState,expectedChanges); | ||
var expected=_lodash2.default.mergeWith(originalState,expectedChanges,toChangeInStateCustomizer); | ||
expect(newState).toEqual(expected); | ||
@@ -41,2 +48,2 @@ | ||
};var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash);var _utils=require('./utils');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} | ||
};var _lodash=require('lodash');var _lodash2=_interopRequireDefault(_lodash);var _utils=require('./utils');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function toChangeInStateCustomizer(objValue,srcValue){if(_lodash2.default.isArray(objValue)){return srcValue;}return undefined;} |
{ | ||
"name": "redux-testkit", | ||
"version": "0.1.21", | ||
"version": "0.1.22", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.org/" |
import _ from 'lodash'; | ||
import {deepEqual} from './utils'; | ||
function toChangeInStateCustomizer(objValue, srcValue) { | ||
if (_.isArray(objValue)) { | ||
return srcValue; | ||
} | ||
return undefined; | ||
} | ||
export default function(reducer, state) { | ||
@@ -21,3 +28,3 @@ const initialState = state || reducer(undefined, {}); | ||
toChangeInState: (expectedChanges) => { | ||
const expected = _.merge({}, originalState, expectedChanges); | ||
const expected = _.mergeWith(originalState, expectedChanges, toChangeInStateCustomizer); | ||
expect(newState).toEqual(expected); | ||
@@ -24,0 +31,0 @@ // expect(mutated).toEqual(false); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
192210
24
595
0
336
1