Vitest and cache
Hello, I'm trying to test the cache process of a worker (proxy requests).
It's a very simple setup, it receives a request, if there's a cached response, return it, otherwise fetch a different origin, cache that response and return it.
The worker works as expected, but in the tests the
Example code in attachment.
It's a very simple setup, it receives a request, if there's a cached response, return it, otherwise fetch a different origin, cache that response and return it.
The worker works as expected, but in the tests the
cache.match never matches, always returns undefined. Am I doing something wrong? Or is this not supported?Example code in attachment.
worker-and-test.txt1.42KB