Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the meaning of "it()" in Jasmine?

Tags:

jasmine

I guess "it" is an abbreviation of a phrase. But I don't know what it is. Each time when I see this function I always try to find out its meaning.

Can somebody tell me about this?

like image 578
wenjiehu Avatar asked Nov 12 '14 08:11

wenjiehu


People also ask

What is describe and it in Jasmine framework?

Specs are defined by calling the global Jasmine function it, which, like describe takes a string and a function. The string is the title of the spec and the function is the spec, or test. A spec contains one or more expectations that test the state of the code.

What does it mean in Jasmine?

The name Jasmine is of Persian origin, meaning ”gift from God." It is derived from the Persian word ”yasmin,” referring to the plant, meaning "fragrant flower." Origin: Jasmine is a Persian name meaning "gift from God" or "fragrant flower." Gender: Jasmine is commonly used as a girl name.

What does describe test it mean?

describe breaks your test suite into components. Depending on your test strategy, you might have a describe for each function in your class, each module of your plugin, or each user-facing piece of functionality. You can also nest describes to further subdivide the suite.

What is beforeEach in Jasmine?

For initializing and cleaning your specs, Jasmine provides two global functions, beforeEach() and afterEach() : The beforeEach function is called once before each spec in the suite where it is called. The afterEach function is called once after each spec in the suite where it's called.


1 Answers

it('is really much more simple than you think)

The it() syntax it is used to tell Jasmine what it('should happen in your test')

like image 97
domokun Avatar answered Oct 07 '22 16:10

domokun