Mocha - Which runs first, beforeEach or before?
<p>I have a web app with a spec like this:</p>

<pre><code>describe('Hook them up', () =&gt; {

    var server;

    beforeEach(done =&gt; {
        server = app.listen(done);
    });

    before(done =&gt; {
       // Does this run before or after "beforeEach"
       // If I try to access the api at this point I get an ECONNREFUSED
    });

    after(done =&gt; {
        server.close(done);
    });


    it('should set the \'createdAt\' property for \'DndUsers\' objects', done =&gt; {
        api.post('/api/tweets')
            .send({ text: 'Hello World' })
            .then(done)
            .catch(err =&gt; {
                console.log(err);
                done();
            });
    });
});
</code></pre>

<p>In some other project of mine, if I try to access the api in the <code>before</code> block it works fine, as if the <code>beforeEach</code> was already run.</p>