Skip to content

Commit

Permalink
redux-form#4069 redux-form#4020 fixed test with ability to keep oncha…
Browse files Browse the repository at this point in the history
…nge values with keepValues
  • Loading branch information
andrew-aladev committed Jan 17, 2020
1 parent 6ebfa49 commit a980cac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/reduxForm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ const describeReduxForm = (name, structure, combineReducers, setup) => {
expect(propsAtNthRender(inputRender, 1).input.value).toBe('bar')
})

it('should support calling change in Form componentDidMount', () => {
it('should support calling change in Form componentDidMount with keepValues', () => {
const store = makeStore({})
const inputRender = jest.fn(props => <input {...props.input} />)
const formRender = jest.fn()
Expand All @@ -832,7 +832,7 @@ const describeReduxForm = (name, structure, combineReducers, setup) => {
const Decorated = reduxForm({ form: 'testForm' })(Form)
TestUtils.renderIntoDocument(
<Provider store={store}>
<Decorated initialValues={initialValues} />
<Decorated initialValues={initialValues} keepValues />
</Provider>
)
expect(store.getState()).toEqualMap({
Expand Down
1 change: 0 additions & 1 deletion src/createReduxForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ const createReduxForm = (structure: Structure<*, *>) => {
pure: true,
forceUnregisterOnUnmount: false,
submitAsSideEffect: false,
keepValues: true,
...initialConfig
}

Expand Down

0 comments on commit a980cac

Please sign in to comment.