How to test changes to the local storage on synchronous cases and asynchronous ones using the testing library.