mirror of
https://github.com/typicode/json-server.git
synced 2025-07-28 04:32:24 +08:00
Add X-Count header when slicing collection
This commit is contained in:
@ -61,7 +61,11 @@ describe('Server', function() {
|
||||
.get('/comments?_start=1&_end=2')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(low.db.comments.slice(1, 2))
|
||||
.expect(200, done)
|
||||
.expect(200)
|
||||
.end(function(err, res){
|
||||
assert.equal(res.headers['x-count'], 5)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -171,4 +175,4 @@ describe('Server', function() {
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user