How can I instantiate a FetchEvent in my test?
Hi! I'm testing my Service Worker library that accepts a
FetchEvent
as an input. In my tests of that library, I want to instantiate a FetchEvent
to test it, but I'm getting
error: ReferenceError: FetchEvent is not definedinstead. My compiler options are: Deno version: Thank you! May 7 edit: Also asked on StackOverflow now.
1 Reply
Deno doesn't support
FetchEvent
global so you can't instantiate it
You'd need to provide a polyfill