mocks: docs, examples, tests

This commit is contained in:
Lloyd Brookes
2015-11-25 20:53:09 +00:00
parent 4150797b24
commit c0a72dbaf2
11 changed files with 338 additions and 58 deletions

View File

@ -0,0 +1,3 @@
{
"one": "static data"
}

View File

@ -1,8 +1,5 @@
module.exports = {
response: function (ctx, id, name) {
this.body = {
id: id,
name: name
}
ctx.body = `<h1>id: ${id}, name: ${name}</h1>`
}
}

View File

@ -1,5 +1,7 @@
const fs = require('fs')
module.exports = {
response: {
body: { id: 2, name: 'eucalyptus', maxHeight: 210 }
body: fs.createReadStream(__filename)
}
}