opsguy7O
Denoβ€’14mo agoβ€’
1 reply
opsguy7

superoak and superdeno completeXhrPromises error.

I'm familar new to Deno. I started creating a simple app and wanted to do some simple HTTP assertion first. But i keep getting the below error is this a known issue ? the images attached i believe show what i'm trying to do etc.

./server.test.ts (uncaught error)
error: (in promise) ReferenceError: window is not defined
      (window as any)[SHAM_SYMBOL].promises,
      ^
    at completeXhrPromises (https://deno.land/x/superdeno@4.9.0/src/test.ts:192:7)
    at https://deno.land/x/superdeno@4.9.0/src/test.ts:558:21
    at close (https://deno.land/x/superdeno@4.9.0/src/close.ts:47:52)

    info: window global is not available in Deno 2.
    hint: Replace `window` with `globalThis`.
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.



ENV below.

deno 2.1.4 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2
"oak": "https://deno.land/x/oak@v17.1.3/mod.ts",
"oakCors": "https://deno.land/x/cors@v1.2.2/mod.ts",
"mongodb": "https://deno.land/x/mongo@v0.32.0/mod.ts",
"asserts": "https://deno.land/std@0.116.0/testing/asserts.ts",
"oakLogger": "https://deno.land/x/oak_logger@1.0.0/mod.ts",
"zod": "https://deno.land/x/zod@v3.11.6/mod.ts",
"superoak": "https://deno.land/x/superoak@4.8.1/mod.ts"
Screenshot_2024-12-11_at_23.28.02.png
Screenshot_2024-12-11_at_23.28.09.png
Screenshot_2024-12-11_at_23.28.17.png
Was this page helpful?