I was reading some training code and I could see that example 1 doesnt use function in the it statement, but in Example#2 I can see it, notice that I am totally new in this world of JS and Protractor, so any feedback will be really appreciate it.
I have search for information but not sure of the difference
Example#1
it('should have a history', () => {
add(1, 2);
add(3, 4);
expect(history.count()).toEqual(2);
add(5, 6);
expect(history.count()).toEqual(3);
});
Example#2
it('should have a history with text', function () {
add(1, 2);
add(3, 4);
expect(history.last().getText()).toContain('1 + 2');
expect(history.first().getText()).toContain('3 + 4');
});