anikethsaha/mern

Adding tests [ server tests ] for the project

Offen

#21 geöffnet am 06.05.2019

 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (45 Forks)auto 404
good first issuehacktoberfesthelp wantedup-for-grabsv2

Repository-Metriken

Stars
 (99 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The test library I am planning to use is jest. category of tests :

  • API tests
  • Snapshot tests

For now just two, please add more if works fine

Example of a test in chai

describe('/GET /', () => {
    it('it should GET all the books', (done) => {
      chai.request(server)
          .get('/')
          .end((err, res) => {
                res.should.have.status(200);
            done();
          });
    });
});

Thanks

Contributor Guide