Fix nested Jasmine tests.

You can nest a "describe" in a "describe":
  describe
    describe
      it

But you can't nest an "it" in an "it":
  describe
    it
      it

The nested "it"s were not getting run (or getting run, but their output
ignored, I'm not sure).

Before this change:
	41 specs, 0 failures
After:
	44 specs, 5 failures
This commit is contained in:
David Fifield 2018-12-04 13:35:48 -07:00
parent 261ef8f5bc
commit fce32bf292

View file

@ -13,7 +13,7 @@ describe 'ProxyPair', ->
pp.begin() pp.begin()
expect(pp.pc).not.toBeNull() expect(pp.pc).not.toBeNull()
it 'accepts WebRTC offer from some client', -> describe 'accepts WebRTC offer from some client', ->
it 'rejects invalid offers', -> it 'rejects invalid offers', ->
expect(pp.receiveWebRTCOffer {}).toBe false expect(pp.receiveWebRTCOffer {}).toBe false
expect pp.receiveWebRTCOffer { expect pp.receiveWebRTCOffer {
@ -56,7 +56,7 @@ describe 'ProxyPair', ->
expect(pp.relay.onerror).not.toBeNull() expect(pp.relay.onerror).not.toBeNull()
expect(pp.relay.onmessage).not.toBeNull() expect(pp.relay.onmessage).not.toBeNull()
it 'flushes data between client and relay', -> describe 'flushes data between client and relay', ->
it 'proxies data from client to relay', -> it 'proxies data from client to relay', ->
spyOn pp.relay, 'send' spyOn pp.relay, 'send'