expect status 200 and type object

This commit is contained in:
MDeghaud67 2023-04-11 11:43:24 +02:00
parent d31e6927dd
commit be7f4e5a16
4 changed files with 20 additions and 6 deletions

View File

@ -0,0 +1,4 @@
const { assert } = chai;
const response1 = await insomnia.send();
assert.equal(response1.status, 200);

View File

@ -0,0 +1,6 @@
const { expect } = chai;
const response1 = await insomnia.send();
expect(response1.status).to.equal(200);
const body = JSON.parse(response1.data);
expect(body).to.be.an('object');

View File

@ -0,0 +1,6 @@
const { expect } = chai;
const response1 = await insomnia.send();
expect(response1.status).to.equal(200);
const body = JSON.parse(response1.data);
expect(body).to.be.an('object');

View File

@ -1,8 +1,6 @@
const response1 = await insomnia.send();
const body = JSON.parse(response1.data);
//const item = body[0];
const { expect } = chai;
const response1 = await insomnia.send();
expect(response1.status).to.equal(200);
const body = JSON.parse(response1.data);
expect(body).to.be.an('object');
//expect(item).to.be.an('');
//expect(response1.status).to.equal(200);
//expect(item).to.have.property('symbol');