Test your redirects and get an easily readable and parsable csv file back. Testing a lot of redirects is hard and this cli aims to make it easier and less time consuming.
yarn
$ yarn global add redirect-test
npm
$ npm i -g redirect-test
redirect-test <file> <url> [options]
file
: A csv file in the following format:
old-URI,new-URI
eg. /about-bob,/about/bob
url
: The URL must be the final URL for the site. If it is not the redirect will get caught to early by conditionals such as non-www -> www and http -> https. Since this tool is not meant to test those types of redirects you will want to use the proper FQDN. eg. https://example.com
-c, --csv
: This will allow you to output to a custom csv file name and path. Default: ./results.csv
-q, --quiet
: This will limit the console output to only print the csv file path.
-n, --number
: The number of concurrent requests to make to the testing URL at a time. Default: 5
yarn
yarn test
If you want to dev locally and run tests on file changes you can run the following.
yarn test-local
NOTE: I politely ask that all pull requests have proper tests otherwise you will be asked to add them.