Skip to content

Commit

Permalink
Fixing runTest script and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrussell committed Mar 27, 2017
1 parent 0aa77df commit 53c29ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ env:
- REACT_ROUTER_VERSION=4
script:
- npm run lint
- runTests.sh
- ./runTests.sh
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
6 changes: 2 additions & 4 deletions runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ rm -rf node_modules/history
if [ "$REACT_ROUTER_VERSION" = "3" ]; then
npm install react-router@3.0.2
npm install react-router-redux@4.0.8
# npm run test:cov -- test/rrv3-test.js
npm run test -- test/rrv3-test.js
npm run test:cov -- test/rrv3-test.js
elif [ "$REACT_ROUTER_VERSION" = "4" ]; then
npm install react-router@4.0.0
npm install history@4.6.1
# npm run test:cov -- test/rrv4-test.js
npm run test -- test/rrv4-test.js
npm run test:cov -- test/rrv4-test.js
fi
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ export const UserAuthWrapper = (args) => {
}

getRedirectFunc = ({ redirect }) => {
// Its silly to test both RR4 and RR3 branches in one test suite, so ignore it
/* istanbul ignore else sanity */
if (redirect) {
return redirect
} else if (this.context.router) {
Expand Down
2 changes: 0 additions & 2 deletions test/rrv3-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,3 @@ describe('UserAuthWrapper React Router V3 Additions', () => {
expect(getLocation().search).to.equal('?redirect=%2Fauth')
})
})

// TODO add redirectAction test

0 comments on commit 53c29ad

Please sign in to comment.