You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Questions:
Is there a way to test a selector which uses a selector function with a parameter of the entire state?
I'm using reselect for some of my selectors, but not all, and it's not working for either (see related issue: angular-redux/store#533)
The text was updated successfully, but these errors were encountered:
My personal approach would be to ensure that you are unit testing the selector function itself only. So in your case, there should be an isolated suite of tests for getItems. Since you would fully exercise that function in a separate suite, I would skip it in your Component suite. I will however take a look at this within our suite.
Thanks for the reply. Yes, I am testing that selector function in its own suite of tests, for sure. However, we're aiming for 100% coverage in our Component suites, and Karma is complaining those functions/lines aren't covered.
Perhaps I'll try mocking the function response through a spy. Let me know if you come up with any other solutions.
This is a...
What toolchain are you using for transpilation/bundling?
ngc
Environment
NodeJS Version: 8.11.2
Typescript Version: ~3.1.3
Angular Version: ^7.0.1
@angular-redux/store version: ^9.0.0
@angular/cli version: (if applicable)
OS:
Code Example
Here's my selector in my component class
where
getItems
is a selector function that returns items from the state that match certain criteriaUnit Test
I'm attempting to set up a unit test for this selector, following the documentation here:
https://github.com/angular-redux/platform/blob/master/packages/store/articles/intro-tutorial.md#unit-testing-selections
My test:
But I'm getting this error in my test:
Questions:
Is there a way to test a selector which uses a selector function with a parameter of the entire state?
I'm using
reselect
for some of my selectors, but not all, and it's not working for either (see related issue: angular-redux/store#533)The text was updated successfully, but these errors were encountered: