globalThis.localStorage causing an exception. The only way I managed to make it work is by faking a localStorage API in an object which I assign to the `localStorage' option. I feel like this is not ideal and likely to lead to problems down the line.