Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans: state/plans test deepfreeze fix #6296

Merged
merged 1 commit into from
Jun 27, 2016
Merged

Conversation

artpi
Copy link
Contributor

@artpi artpi commented Jun 24, 2016

Fix deepfreeze usage in state/plans/reducer

It seems that we are deepFreezin after objects have an ability to mutate.

Testing

npm run test-client

CC @gwwar @retrofox

Test live: https://calypso.live/?branch=fix/state-plans-deepfreeze

@artpi artpi added [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Type] Janitorial State labels Jun 24, 2016
@artpi artpi added this to the Plans: Maintenance milestone Jun 24, 2016
@artpi artpi self-assigned this Jun 24, 2016
@@ -58,10 +58,10 @@ describe( 'reducer', () => {
const initialState = undefined;
const plans = getValidDataFromResponse( WPCOM_RESPONSE );
const action = plansReceiveAction( plans );
const newState = itemsReducer( initialState, action );
const expectedState = plans;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe deepFreeze and assign on a single line:

const expectedState = deepFreeze( plans );

@gwwar
Copy link
Contributor

gwwar commented Jun 24, 2016

Thanks for finding and cleaning this up 👍

@artpi artpi merged commit a4653da into master Jun 27, 2016
@artpi artpi deleted the fix/state-plans-deepfreeze branch June 27, 2016 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. State [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants