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