boramalper
boramalper
DDeno
Created by boramalper on 5/6/2025 in #help
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 defined
instead. My compiler options are:
{
"compilerOptions": {
"lib": ["ES2023", "WebWorker", "deno.ns"],
"strictNullChecks": true
},
}
{
"compilerOptions": {
"lib": ["ES2023", "WebWorker", "deno.ns"],
"strictNullChecks": true
},
}
Deno version:
deno 2.2.10 (stable, release, aarch64-apple-darwin)
v8 13.5.212.10-rusty
typescript 5.7.3
deno 2.2.10 (stable, release, aarch64-apple-darwin)
v8 13.5.212.10-rusty
typescript 5.7.3
Thank you! May 7 edit: Also asked on StackOverflow now.
3 replies
DDeno
Created by boramalper on 2/8/2025 in #help
I cannot make deno exclude dist/ directory
👋 I'm trying to make deno exclude the dist/ directory from formatting but couldn't. I tried the exclude and fmt.exclude fields in deno.json and tried different values—dist, dist/, dist/*—but nothing worked. Every single time I run deno fmt (in the same directory where my deno.json is), I see that the files in dist/ directory are also formatted. It's not a dealbreaker but being unable to get something so small and simple is quite annoying. Is this a bug or am I doing something wrong? Thanks!
3 replies