jeudi 30 novembre 2017

Evaluating the status code using chai framework

My return object structure of e._data.info is as follows

  { errors: 
       [ { status: 404,
           message: 'Not Found',
          }
         ],
      }

I am trying to assert some stuff here (Ex status) using the includes, should be patterns. Ex :

expect(e._data.info).to.include('404');

But it is not working out.

Any quick tip will be appreciated.

Aucun commentaire:

Enregistrer un commentaire