Jest test local function. Turns out, Jest gives you access to all sorts of browser APIs (fetch, localStorage, etc)...