How to mock a full cache? #133
Unanswered
rdogmartin
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Why do you need a mock? You can update the cache using the store. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing a unit test for my service class and want to verify that it does not make an HTTP request when the cache is full. I think the key might be with mocking
createRequestsCacheOperator
:But I'm not sure how to write the implementation so the code thinks the cache is full. Been staring at your source code and trying a bunch of things with no success.
app-info.repository.ts:
app-info.service.ts:
app-info.service.spec.ts:
Beta Was this translation helpful? Give feedback.
All reactions