You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to just use this because it does not work.
describe("a",()=>{it("b",()=>{constwindow=newWindow();constdocument=window.document;// add globalThis.test here.expect(window["test"]).not.toBe(undefined);// does not work. });it("c",()=>{constwindow=newWindow();constdocument=window.document;});})
What works is if I use the GlobalRegistrator. The same code would work. BUt the it("c") will inherit the new global variable "test" from the previous it
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I can't seem to just use this because it does not work.
What works is if I use the GlobalRegistrator. The same code would work. BUt the
it("c")
will inherit the new global variable"test"
from the previous itBeta Was this translation helpful? Give feedback.
All reactions