Update README.md

This commit is contained in:
Lloyd Brookes
2017-07-07 09:39:22 +01:00
committed by GitHub
parent 22bc5df12c
commit b2e72d86af

View File

@ -54,8 +54,10 @@ const users = [
{ "id": 3, "name": "Francesco", "age": 24 }
]
/* response mocks for /users */
module.exports = [
module.exports = MockBase => class MockUsers extends MockBase {
mocks () {
/* response mocks for /users */
return [
{
route: '/users',
responses: [
@ -80,7 +82,9 @@ module.exports = [
}
]
}
]
]
}
}
```
Next, launch `ws` passing in your mock response file: