Expert
Given the following module and controller:
angular
.module('app', [])
.conroller('appController', function () {
this.greeting = 'hello';
});
And its associated unit test:
describe('app', function () {
beforeEach(module('app'));
describe('appController', function () {
beforeEach(inject(function () {
appController = $controller('appController');
}));
it('should greet us', function () {
expect(appController.greeting).toBe("hello");
});
});
});
What will happen?
Author: Mathieu RobinStatus: PublishedQuestion passed 109 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
A way to modify the native behavior of a service1
Add an entry to the browser history1
What is the name of the AngularJS class that is used to create a singleton service?1
How to get all the values of an array in AngularJS1
What is the value of the expression `promise.then(null, function() {})` if `promise` is rejected with an error?1
How to access the parent scope in AngularJS1
Add features and data to the $scope