This commit is contained in:
Lloyd Brookes
2016-06-20 20:32:32 +01:00
parent ef9bbf8066
commit 22612bbcf4
34 changed files with 59 additions and 88 deletions

View File

@ -0,0 +1,8 @@
{
"mocks": [
{
"route": "/",
"module": "/mocks/delayed.js"
}
]
}

View File

@ -0,0 +1,11 @@
module.exports = {
name: 'delayed response',
response: function (ctx) {
return new Promise((resolve, reject) => {
setTimeout(() => {
ctx.body = '<h1>You waited 2s for this</h1>'
resolve()
}, 2000)
})
}
}