I’m working with Mocha.js for testing in a Node.js – Express.js – Firebase
I need a token from Firebase to access the API endpoints, I have a before hook in all my files, but after about 250 tests, probably calling the authentication endpoint multiple times, I’m getting rate limited by firebase.
I want to get the token once and use it in all my tests.
The tests are spread in different files, I have an index.js that requires them all.
I’m aware of Root Level Hooks, but how can I save the token and use it in all my separate files?
Thanks!