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

Add enableReducers and renderProp option to TestContext to help with integration testing #2614

Merged
merged 1 commit into from
Dec 4, 2018
Merged

Add enableReducers and renderProp option to TestContext to help with integration testing #2614

merged 1 commit into from
Dec 4, 2018

Conversation

peter-mouland
Copy link
Contributor

  • Add children as a renderProp option
    • return the store if the children is a function
  • Add enableReducers prop option
    • will allow dispatching of actions

these are opt-in change, not breaking changes.

fixes #2613
fixes #2612

Copy link
Member

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

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

Neat!

packages/ra-core/src/util/TestContext.js Outdated Show resolved Hide resolved
packages/ra-core/src/util/TestContext.js Outdated Show resolved Hide resolved
docs/UnitTesting.md Show resolved Hide resolved
@fzaninotto
Copy link
Member

I forgot: as its a new feature, it should be PRed against the next branch, not master. Please rebase your PR.

@peter-mouland peter-mouland changed the base branch from master to next December 4, 2018 14:25
@peter-mouland peter-mouland reopened this Dec 4, 2018
@peter-mouland
Copy link
Contributor Author

I've now rebased from next and made the suggested changes. Let me know if you have any other questions.

@fzaninotto fzaninotto changed the title feat(TestContext): enable deeper integration testing Add enableReducers and renderProp option to TestContext to help with integration testing Dec 4, 2018
@fzaninotto fzaninotto merged commit 3614216 into marmelab:next Dec 4, 2018
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the 2.6.0 milestone Dec 4, 2018
@peter-mouland peter-mouland deleted the feat/test-context-props branch December 4, 2018 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants