~endlessm/jasmine-gjs/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* eslint no-restricted-globals: off */

// This is a test of focused suites and specs with the fdescribe() and fit()
// functions. It's taken from Jasmine's documentation suite:
//   http://jasmine.github.io/2.2/focused_specs.html

// By definition, this suite will disable all other suites that are run during
// the same invocation of Jasmine -- so it is skipped by default. To run this
// test anyway, run it explicitly with "jasmine
// test/focusedSpecIntegrationTest.js". During "make check" it is still run,
// since make runs the spec files one by one and so this suite won't interfere
// with any other suites.

describe('Focused specs', function () {
    fit('is focused and will run', function () {
        expect(true).toBeTruthy();
    });

    it('is not focused and will not run', function () {
        expect(true).toBeFalsy();
    });

    fdescribe('focused describe', function () {
        it('will run', function () {
            expect(true).toBeTruthy();
        });

        it('will also run', function () {
            expect(true).toBeTruthy();
        });
    });

    fdescribe('another focused describe', function () {
        fit('is focused and will run', function () {
            expect(true).toBeTruthy();
        });

        it('is not focused and will not run', function () {
            expect(true).toBeFalsy();
        });
    });
});