Add localstorage unit tests