title: Protractor Jasmine describe blocks nested within an it block
body: <p>First of all, the below code seems to work. However, I have not yet seen anyone do this so I am wondering if this is even legitimate and if I am missing unforeseen downsides. </p>
  
  <p>The context is that I am writing an E2E test with Protractor which uses Jasmine-style describe/it blocks. My goal is to load a page and run a bunch of <code>it</code> tests blocks without reloading that page each time (because its time consuming).</p>
  
  <p>The construct I have is:</p>
  
  <pre><code>describe("Homepage", function () {
  
      beforeEach(function () {
          browser.get("/"); //loads the page
      });
  
      it('elements', function () {
          describe('test group', function () {
              it('test 1', function () {
                  //run stuff 1
              });
  
              it('test2', function () {
                  //run stuff 2
              });
          })
      });
  });
  </code></pre>
  
  <p>I realize an alternative is just to do this:</p>
  
  <pre><code>describe("Homepage", function () {
  
      beforeEach(function () {
          browser.get("/"); //goes to homepage
      });
  
      it('elements', function () {
          //run stuff 1
          //run stuff 2
  
      });
  });
  </code></pre>
  
  <p>But the issue is that I can't separate the tests and you end up with a big <code>it</code> block. I want to somehow avoid the issue of running beforeEach every single time but still be able to have a nicely separated set test blocks.</p>
  
  <hr>
  
  <p>By the way, I have also tried this:</p>
  
  <pre><code>describe("Homepage", function () {
  
      browser.get("/"); //goes to homepage
  
      it('elements', function () {
          //run stuff 1
          //run stuff 2
  
      });
  });
  </code></pre>
  
  <p>except this doesn't work when you have multiple specs like this. The browser.get() all run one after the other before the tests get run.</p>