Specs and suites can be focused so ONLY those suites and specs execute. You will do this by prefixing certain functions with the letter f or by using the focused argument in each of them. The reporters will show that these suites or specs where execute ONLY The functions you can prefix are:
it()
describe()
story()
given()
when()
then()
feature()
1
fstory("A spec",function(){
2
it("was just skipped, so I will never execute",function(){
3
coldbox =0;
4
coldbox++;
5
​
6
expect( coldbox ).toBe(1);
7
});
8
});
9
​
10
describe("A spec",function(){
11
it("is just a closure, so it can contain any code",function(){
12
coldbox =0;
13
coldbox++;
14
​
15
expect( coldbox ).toBe(1);
16
});
17
​
18
fit("can have more than one expectation, but I am skipped",function(){
19
coldbox =0;
20
coldbox++;
21
​
22
expect( coldbox ).toBe(1);
23
expect( coldbox ).toBeTrue();
24
});
25
});
Copied!
Please note that if a suite is focused, then all of its children will execute.