How do you mock global objects like `window` or `localStorage`?

Intermediate Premium

Answer

Premium Content

Unlock this answer and gain access to all premium interview questions.

Upgrade to Premium