Hi all,
I have some logic in the run block of my app
file app.js
app.config(
// routes etc..
)..run(
// logic here
);
this logic have to run only once when the user enters the app,
for example an async request to get the user session data.
I would like to set up tests for this block, but after lots of searching I
couldn't find any way to do so.
I would like to follow all the best practices, so, the first question is,
is the run block the correct point to do this kind of checking?
If not, what would be a better solution?
Please note that I did not use the resolve property because the application needs this checking
in every module but just once (when the use enter th app, that could be any controller).
I hope that someone could enlight me!
Regards