It means "this," as in the word "this." As in the test declaration, it is read as a sentence. You describe object that it does. Just like that.
For example:
Bowling ball round
Bowling ball has 3 holes
Transfer to the test hierarchy as follows:
Bowling Ball it is round it has three holes
To switch to the following test setup:
describe(BowlingBall, function() { it('is round', function() {}); it('has three holes', function() {}); });
Since it reads well, it just becomes how you separate individual test cases. He also encourages you to write a test description so that it is part of a sentence that describes the test, which makes your test suite more readable in the long run.
After all, BDD is all about readability for the author of the test. So it's just sugar.
Alex wayne
source share