configurable rest service system mock
use mountebank - over the wire test doubles http://www.mbtest.org/
- you don't need mock-n-roll for mocking service layers in your unit tests, use Sinion
- you don't need mock-n-roll for mocking http requests in your integration tests, use network interceptors - nock is cool
- when doing blackbox testing of your client side code, you may want to use mock-n-roll.
- you could specify any repsonse body in the post body
- you cold specify any service call as path parameter, here environment, /mock/configure/environment/200
- you cold specify any response http code as path parameter, here 200, /mock/configure/environment/200
echo '{
"location": {"longitude": 89.582, "latitude": 99.1351},
"zipId": "19900135",
"ssd": {},
"connection": {"wifiStatus": "OK", "radioStatus": "HIGH"}
}
' | curl -X POST -d @- http://localhost:3081/mock/configure/environment/200 --header "Content-Type:application/json"
curl http://localhost:3081/api/v1/environment
curl -X DELETE http://localhost:3081/mock/configure
todo mocha before
module.exports = {
vHost: 'your.funny.domain.dev',
baseUrl: '/api/v1',
port: 1234,
mockedMethods = [
'get',
'post',
'put',
'patch',
'delete',
// 'head'
]
}
- get rid of connect-*
- cross-env or cli or node standard
- author
- lib usage
- eslint autofix
- SwaggerDoc
- licence
- mxd-eslint
- default overrule pathes (feature)
- proxy recording mode
- ngrok
* express
* https://github.com/icholy/ttygif
* https://github.com/swagger-api/swagger-js
* https://jbt.github.io/markdown-editor
$ git commit -a --author="bs <email>" -m "readme"
Copyright 2016
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.