Comparison of the generated selection functions
See original GitHub issueHi, i’m having some problems with comparison of the select functions: This is begining of my saga:
export function* mySaga() {
const { data } = yield select(componentSelectors.getComponent(componentId))
/** some logick */
}
and a test for her:
it('Testing mySaga', () => {
const componentId = 1;
testSaga(mySaga)
.next()
.select(componentSelectors.getComponent(componentId))
/** test continuation */
});
When I run the test, I get an error: “select effects do not match”
Expected
--------
{ selector: [Function: bound ], args: [] }
Actual
------
{ selector: [Function: bound ], args: [] }
And so it happens to all tests, where i’m using generated selector getComponent and other like him:
const getComponents = state => state["components"];
const getComponent = id => state => {
const { [id]: component } = getComponents(state);
return component;
};
export const componentSelectors= {
getComponents,
getComponent
}
}
Can I somehow use your library to compare the generated functions?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to compare the performance of feature selection methods?
Feature selection performance can be evaluated by the overall performance of learning task for example one can select features with different methods and ......
Read more >How to Choose a Feature Selection Method For Machine ...
Wrapper feature selection methods create many models with different subsets of input features and select those features that result in the best ...
Read more >On Comparison of Feature Selection Algorithms
Feature selection (FS) is extensively studied in machine learning. We often need to compare two FS algorithms. (A1,A2). Without knowing true relevant features, ......
Read more >Comparison of five supervised feature selection algorithms ...
Here, we used five state-of-the-art feature selection algorithms, viz., mRMR, DFS, INMIFS, SVM-RFE-CBR and VWMRmR to select a small subset of ...
Read more >Comparison of Methods for Feature Selection in Clustering of ...
(2017) compared feature selection algorithms based on execution time, number of selected features and classification accuracy in two ...
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
@pavel-rakhmanov I encountered the same issue, this is how I solved it:
Another option that doesn’t involve any mocking is you can wrap the creation of your generated function with a
call
. This results in the original function looking like this:This can then be tested with: