https://github.com/cpitkin/redirect-test
Test your redirects and get an easily readable and parsable csv file back
https://github.com/cpitkin/redirect-test
http nodejs-cli redirects testing
Last synced: 21 days ago
JSON representation
Test your redirects and get an easily readable and parsable csv file back
- Host: GitHub
- URL: https://github.com/cpitkin/redirect-test
- Owner: cpitkin
- License: mit
- Created: 2017-07-04T23:54:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T10:22:55.000Z (about 3 years ago)
- Last Synced: 2025-10-13T20:40:47.684Z (4 months ago)
- Topics: http, nodejs-cli, redirects, testing
- Language: JavaScript
- Homepage:
- Size: 630 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# redirect-test
[](https://www.npmjs.com/package/redirect-test)
[](https://travis-ci.org/cpitkin/redirect-test)
[](https://codeclimate.com/github/cpitkin/redirect-test)
[](https://codeclimate.com/github/cpitkin/redirect-test/coverage)
[](https://codeclimate.com/github/cpitkin/redirect-test)
[](https://david-dm.org/cpitkin/redirect-test)
> 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
```sh
$ yarn global add redirect-test
```
npm
```sh
$ npm i -g redirect-test
```
## Usage
```sh
redirect-test [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

## Tests
yarn
```sh
yarn test
```
If you want to dev locally and run tests on file changes you can run the following.
```sh
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](LICENSE)
### [Changelog](CHANGELOG.md)