Angular service unit test how to preserve state between each spec
I have an angular service that performs API calls. it has a method to login and store the access token in the service for the subsequent API call to use. When I run unit test, I first test the login method, then test the other API calls methods. But the other API calls test fail because the stored token become undefined. How do I preserve the service state so that I don’t need to login again in every spec?