Test your redirects and get an easily readable and parsable csv file back
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
test
.editorconfig
.eslintrc
.gitignore
.nvmrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

redirect-test

NPM version Build Status Code Climate Test Coverage Issue Count Dependency Status

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.

Install

yarn

$ yarn global add redirect-test

npm

$ npm i -g redirect-test

Usage

redirect-test <file> <url> [options]

Required fields

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

Options

-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

Results

Screenshot

Tests

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.

License

MIT © 2017 Charlie Pitkin

Changelog