0.0.1 • Published 4 years ago

@gugacavalieri/brief-js v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

brief-js Build Status

Brief is a validation tool that can help you assert your http web service migrations.

How to use it

  1. First install it using npm:
npm install -g @gugacavalieri/brief-js
  1. Create a config file (you can pass http headers if you like):
{
    "domains": {
        "new": "https://jsonplaceholder.typicode.com",
        "old": "https://jsonplaceholder.typicode.com"
    },
    "http": {
        "timeout": 10000,
        "headers": {
            "Authorization": "Bearer ..."
        }
    },
    "endpoints": [
        { "method": "get", "url": "todos/1" }
    ]
}
  1. Run it!
brief-js --config config.json

It should print response codes as well as different outputs in the endpoints that you defined in the config file.

Future improvements:

  • Replace axios
  • Create log levels
  • Improve tests (stryker)