Skip to content

Commit

Permalink
add mock_1.js
Browse files Browse the repository at this point in the history
  • Loading branch information
leeluolee committed May 30, 2015
1 parent 7f167d0 commit bdb4a3b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/fixtures/mock_1.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

module.exports = {
"POST /path/to": function( req, res ){
res.send( req.query );
res.send({

});
},
'GET /homepage': "./template/index.html",
'GET /api/(.*)': "get/{0}.json",
'POST /api/(.*)': "post/{0}.json",
"GET /raw": {code: 100, result: 200},
Expand All @@ -22,8 +25,9 @@ module.exports = {
]
})
},
'ALL /q/:id': 'http://segmentfault.com/',
'ALL /(pub|img)/(.*)': 'http://nec.netease.com',
'ALL /q/:id': ['http://segmentfault.com/', function(content, done){
done(content)
}],
'ALL /p/(.*)': 'http://nec.netease.com/plugin/{0}',
'ALL (.*)': 'http://nec.netease.com/',
"/blog/get": "xxx.html"
Expand Down

0 comments on commit bdb4a3b

Please sign in to comment.