How to send multiple json in post request using supertest #303
Open
Description
it('post the user', () => {
const value = [{
text: 'Todo1'
},
{
text: 'Todo2'
}];
return request(app)
.post('/api/todos/')
.send({value})
.then(res => {
res.should.have.status(201);
});
});
Got Error:
1 failing
-
The server
on GET /api/todos requests
post the user:AssertionError: expected { Object (_events, _eventsCount, ...) } to have status code 201 but got 400
- expected - actual
-400
+201
- expected - actual
Metadata
Assignees
Labels
No labels