anikethsaha/mern

Adding tests [ server tests ] for the project

オープン

#21 opened on 2019/05/06

 (11 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (45 件のフォーク)auto 404
good first issuehacktoberfesthelp wantedup-for-grabsv2

Repository metrics

Stars
 (99 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド