forwardemail / forwardemail/supertest

Do I have to repeat request(app)?

Open
#607 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.4k
Forks
782
PR merge metrics
No merged PRs in 30d

Description

Is there merit in repeating `request(app)`? Do I have to keep repeating it on every test? Can I just perform this step in one initialization file and forget about it?

I'm talking about this:

```
const request = require('supertest');

describe('Articles', function () {
it('should allow users to list all articles', function (done) {
request(app).get('/articles').expect(200, done)
});

it('should allow users to get one article', function (done) {
request(app).get('/articles/2').expect(200, done)
});
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.