Closed sithmel closed 4 years ago
stale-if error works fine in cacheable-request https://github.com/lukechilds/cacheable-request/issues/94. Without changing the code. I have created a test case locally.
Sorry, GitHub UI is stupid and I didn't notice that my comments weren't public yet
I also added an easy way to mock time. Tests were randomly breaking otherwise.
Please don't add unrelated functionality to a PR.
I don't like the mocking change. The now
method exist specifically to be monkey-patched in tests, so it doesn't need another way of being patched.
I have reverted the mock. I missed to realise that there was already a way. Thanks for spotting that!
I had to monkey patch now
for a single test that was failing in CI.
Thank you
solves #27