Skip to content

Instantly share code, notes, and snippets.

View avanslaars's full-sized avatar

Andy Van Slaars avanslaars

View GitHub Profile
@avanslaars
avanslaars / Unit Test Angular Run Block.js
Last active August 29, 2015 14:17
Simple example of unit testing run block in angular
(function () {
angular.module('MyApplication')
.run(appStartup)
appStartup.$inject = ['$cookieStore', 'AuthService']
function appStartup($cookieStore, AuthService)
{
var token = $cookieStore.get('auth-token')
if(token){
AuthService.LoadToken(token)
}