redux-testkit
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "redux-testkit", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Test kit for redux", | ||
@@ -5,0 +5,0 @@ "author": "Yedidya Kennard <yedidyak@gmail.com>", |
import _ from 'lodash'; | ||
export class ReducerTest { | ||
constructor(reduce) { | ||
constructor(reduce, initialState = {}) { | ||
this.uut = reduce; | ||
this.initialState = initialState; | ||
} | ||
@@ -12,3 +13,4 @@ | ||
it(`${index}:${name} ${(param.description || '')}`, () => { | ||
const {state, action, expected} = param; | ||
let {state, action, expected} = param; | ||
state = state ? state : _.cloneDeep(this.initialState); | ||
const result = this.uut(state, action); | ||
@@ -15,0 +17,0 @@ testEqual(result, expected); |
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
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
25870
356