Created
February 6, 2017 17:17
-
-
Save javaeeeee/c9733c1f4ba91d61cbf159741ad15bc9 to your computer and use it in GitHub Desktop.
A test for an AngularJS controller that uses Controller As syntax. The test doesn't rely on AngularJS scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('HelloController tests', function () { | |
var HelloController; | |
beforeEach(function () { | |
module('app'); | |
inject(function ($controller) { | |
HelloController = $controller('HelloController'); | |
}); | |
}); | |
it('should be World', function () { | |
expect(HelloController.myModel).toEqual('World'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment