`select` effect
See original GitHub issueHi,
I want to ask about handling select
saga effect in tests.
My use case is:
expectSaga(mySaga).withReducer(myReducer, initialReducerState)
In saga implementation I’m just calling const param = yield select((wholeState) => wholeState.moduleState.param)
So in result following code it is crushing because select
effect is returning initialReducerState
instead of wholeState
.
Is it expected behaviour? Can it be handled without using fakes?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Selection Effect — What It Is and Why It's Important
Selection Effect is the bias introduced when a methodology, respondent sample or analysis is biased toward a specific subset of a target ...
Read more >What Is Selection Effect, and How Can I Avoid It? | Built In
Selection effect is a type of bias introduced when a methodology, respondent sample or analysis is skewed toward a specific subset of a...
Read more >Selection bias - Wikipedia
Selection bias is the bias introduced by the selection of individuals, groups, or data for analysis in such a way that proper randomization...
Read more >Selection Effects - Eso.org
Selection Effects. Several effects may bias samples of blazars, causing them to miss objects which fall within their survey area and flux limits....
Read more >What is a “Selection Effect” in online testing? And why does it ...
Selection Effects is one of the 4 primary threats to test validity and represents the effect on a test variable, such as conversion...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah, to have my case covered, I used following mock:
Still I think that it is not so great to mock also the selectors so it would be cool to have that woking in the future.
I have some trouble in unit test too. I have this test:
And got an error on a string with ‘select’:
My selector is:
How can I fix this issue?
“react”: “16.3.1”, “redux”: “3.6.0”, “redux-saga”: “0.15.3” “redux-saga-test-plan”: “^4.0.0-beta.1”,