Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80665 views
1
describe "jasmine-only", ->
2
3
describe "exclusive spec helpers", ->
4
5
normal = jasmine.createSpy('normal spec')
6
exclusive = jasmine.createSpy('exclusive spec')
7
8
describe "it.only", ->
9
it "shouldnt execute this 1", normal
10
it.only "it only executes this using `it.only`", exclusive
11
12
describe.only "describe.only", ->
13
it "shouldnt execute this 2", normal
14
it.only "it only executes this using `it.only` within `describe.only`", exclusive
15
16
describe "block assertions", ->
17
it.only "does not call normal blocks", ->
18
expect(normal).not.toHaveBeenCalled()
19
it.only "only calls exclusive blocks", ->
20
expect(exclusive.callCount).toBe(2)
21
22
describe "aliases", ->
23
it.only "provides aliases `ddescribe` and `iit`", ->
24
expect(ddescribe).toEqual(describe.only)
25
expect(iit).toEqual(it.only)
26
27
describe.only "does not run or blow up using `describe.only`", ->
28
it "shouldnt execute this 3", normal
29
30