mirror of
https://github.com/typicode/json-server.git
synced 2025-07-30 21:54:11 +08:00
Update rewriter (#580)
This commit is contained in:
@ -42,7 +42,7 @@ describe('cli', () => {
|
||||
)
|
||||
|
||||
routesFile = tempWrite.sync(
|
||||
JSON.stringify({ '/blog/': '/' }),
|
||||
JSON.stringify({ '/blog/*': '/$1' }),
|
||||
'routes.json'
|
||||
)
|
||||
|
||||
@ -260,7 +260,7 @@ describe('cli', () => {
|
||||
})
|
||||
|
||||
it('should watch routes file', done => {
|
||||
fs.writeFileSync(routesFile, JSON.stringify({ '/api/': '/' }))
|
||||
fs.writeFileSync(routesFile, JSON.stringify({ '/api/*': '/$1' }))
|
||||
setTimeout(() => {
|
||||
request.get('/api/posts').expect(200, done)
|
||||
}, 1000)
|
||||
|
Reference in New Issue
Block a user