[tor-commits] [snowflake/master] Fix nested Jasmine tests.

dcf at torproject.org dcf at torproject.org
Tue Dec 4 22:10:08 UTC 2018


commit fce32bf292b24467e4e8286e557f5ec64f77b3b8
Author: David Fifield <david at bamsoftware.com>
Date:   Tue Dec 4 13:35:48 2018 -0700

    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
---
 proxy/spec/proxypair.spec.coffee | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/spec/proxypair.spec.coffee b/proxy/spec/proxypair.spec.coffee
index 992b53f..1ef4a7e 100644
--- a/proxy/spec/proxypair.spec.coffee
+++ b/proxy/spec/proxypair.spec.coffee
@@ -13,7 +13,7 @@ describe 'ProxyPair', ->
     pp.begin()
     expect(pp.pc).not.toBeNull()
 
-  it 'accepts WebRTC offer from some client', ->
+  describe 'accepts WebRTC offer from some client', ->
     it 'rejects invalid offers', ->
       expect(pp.receiveWebRTCOffer {}).toBe false
       expect pp.receiveWebRTCOffer {
@@ -56,7 +56,7 @@ describe 'ProxyPair', ->
     expect(pp.relay.onerror).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', ->
       spyOn pp.relay, 'send'





More information about the tor-commits mailing list