mirror of
https://github.com/typicode/json-server.git
synced 2025-07-29 05:03:04 +08:00
Add failing test
This commit is contained in:
@ -11,7 +11,8 @@ describe('Server', () => {
|
||||
'/api/': '/',
|
||||
'/blog/posts/:id/show': '/posts/:id',
|
||||
'/comments/special/:userId-:body': '/comments/?userId=:userId&body=:body',
|
||||
'/firstpostwithcomments': '/posts/1?_embed=comments'
|
||||
'/firstpostwithcomments': '/posts/1?_embed=comments',
|
||||
'/articles?_id=:id': '/posts/:id'
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
@ -704,6 +705,14 @@ describe('Server', () => {
|
||||
.end(done)
|
||||
})
|
||||
|
||||
// TODO
|
||||
// it('should rewrite query params', (done) => {
|
||||
// request(server)
|
||||
// .get('/articles?_id=1')
|
||||
// .expect(db.posts[0])
|
||||
// .end(done)
|
||||
// })
|
||||
|
||||
it('should expose routes', (done) => {
|
||||
request(server)
|
||||
.get('/__rules')
|
||||
|
Reference in New Issue
Block a user