DEV Community

Discussion on: Mocking browser APIs (fetch, localStorage, Dates...) the easy way with Jest

Collapse
 
shadowtime2000 profile image
shadowtime2000

Doesn't Jest automatically use JSDOM which has support for stuff like localStorage?

Collapse
 
bholmesdev profile image
Ben Holmes

Ah, right you are! I was confused reading up on Node's global object; Turns out JSDOM is the culprit for all these APIs being visible. I'll update that callout!