Question: I want to set up a request once and then use it in multiple tests. This was the best way I could come up to do that, but it seems odd to have to have to declare `req` mutable just so it will be available in an outside scope.

```js
describe('GET /password', () => {
  let req
  before(() => {
    req = chai.request(app).get('/password')
    return req
  })

  it('should get the password page', () => {
    return req.then(res => res.should.have.status(200))
  })

  describe('The password page', () => {
    it('should render HTML', () => {
      return req.then(res => res.should.be.html)
    })
  })
})

```

I was hoping I could do something like

```js
const req = before(() => {
  return chai.request(app).get('password')
})

```

... but it seems that `before()` does not return the value returned in its callback.

Is there a better (more "elegant") way to do this?

Answer: 
You can simply use a function returning a promise:

```
describe('GET /password', () => {

   function getPassword () {
      return chai.request(app).get('/password')
   }

   it('should get the password page', () => {
      return getPassword()
         .then(res => res.should.have.status(200))
         .catch(err => err.should.not.exist)
   })

   describe('The password page', () => {
      it('should render HTML', () => {
         return getPassword()
            .then(res => res.should.be.html)
            .catch(err => err.should.not.exist)
      })
   })

})

```

I find using a function also much more readable than using `before` which is not visible at first look.
In my previous experience, I usually stored the response in a variable then in each test, I accessed that variable. Seems that your case is only care about response so this solution below may fit. 

```js
describe('GET /password', () => {
  let response; // create a variable

  before(() => {
    return chai.request(app).get('/password') // add `return` here for promise
      .then(res => {
        response = res; // store response from api to the variable
      })    
  })

  it('should get the password page', () => {
    response.should.have.status(200);
  })

  describe('The password page', () => {
    it('should render HTML', () => {
      response.should.be.html
    })
  })
})

```

Having the variable as mutable is not odd in my opinion. 

Hope it helps