$q API play with jasmine in single html page