The following code snippet is the corner documentation . What is the function here it()(I assume that it has some kind of conditional value, because otherwise it makes no sense)? I do not see any links to it on the corner site. It is also difficult for Google because of its name. The context concerns code testing.
it('should say hello', function() {
var scopeMock = {};
var cntl = new MyController(scopeMock);
expect(scopeMock.username).toEqual('World');
scopeMock.username = 'angular';
scopeMock.sayHello();
expect(scopeMock.greeting).toEqual('Hello angular!');
});
source
share