Skip to content

Instantly share code, notes, and snippets.

@tomasmalmsten
Last active January 3, 2016 23:39
Show Gist options
  • Save tomasmalmsten/8536860 to your computer and use it in GitHub Desktop.
Save tomasmalmsten/8536860 to your computer and use it in GitHub Desktop.
Setup of QUnit for Angular application
'use strict';
var injector, ctrl, scope;
module('tests', {
setup: function() {
var appModule = angular.module('freecycleApp');
injector = angular.injector(['ng', 'freecycleApp']);
scope = injector.get('$rootScope').$new();
ctrl = injector.get('$controller')
('NodeController', {$scope: scope});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment