BrandonB
Denoβ€’12mo agoβ€’
6 replies
Brandon

Deno test fails(using - superoak)

Hi. I am new to deno and I am struggling, can someone kindly assist.

I am doing a backend test case for my code but it fails regards of what I do. I do not understand the error nor what to do about it.

./test/auth_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`.
Screenshot_from_2025-01-23_10-54-39.png
Screenshot_from_2025-01-23_10-54-24.png
Screenshot_from_2025-01-23_10-54-06.png
Was this page helpful?