Skip to content

Instantly share code, notes, and snippets.

@ecowden
Last active January 2, 2016 22:49
Show Gist options
  • Save ecowden/8372750 to your computer and use it in GitHub Desktop.
Save ecowden/8372750 to your computer and use it in GitHub Desktop.
// "clean" way to pull in app module
var appModule = require('../appModule');
appModule.controller('myController', function(dependencyA, dependencyB) {
// ...
});
// --- TEST ---
describe('myController', function () {
// wait, what? We need to require() it somehow first, right? Does this work?
beforeEach(function() {
require('../appModule');
module('appModule'));
}
it('whatever...', function () {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment