-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial jest conversion * Remove macho setup and remove jsdom package. * PromiseMiddleware test refactor. * Refactor ReduxTaxi tests to jest expect * Refactor ReduxTaxiMiddleware test to jest expect * Refactor ReduxTaxiProvider to jest expect * Refactor RegisterAsyncActions test to jest expect * Remove chai package * Remove trailing commas * Add Prettier * Add Prettier * Update list-staged file catch * Run Prettier on all JS files * Remove sinon in favor for jest mocks. * removing prettier deps from this PR. * remove trailing comma
- Loading branch information
Showing
13 changed files
with
286 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,49 @@ | ||
{ | ||
"name": "redux-taxi", | ||
"version": "1.2.0", | ||
"description": "Inform server-side rendering from the component level when dealing with asynchronous actions.", | ||
"main": "lib/index", | ||
"scripts": { | ||
"compile": "rm -rf ./lib && babel -d lib/ src/", | ||
"prepublish": "npm run test && npm run compile", | ||
"test": "jest" | ||
}, | ||
"repository": "NYTimes/redux-taxi", | ||
"keywords": [ | ||
"redux", | ||
"react", | ||
"taxi", | ||
"server rendering", | ||
"ssr", | ||
"isomorphic", | ||
"universal", | ||
"nytimes" | ||
], | ||
"author": "Jeremy Gayed (https://github.com/tizmagik)", | ||
"contributors": [ | ||
"Ivan Kravchenko (https://github.com/ivankravchenko)", | ||
"Devorah Moskowitz (https://github.com/devorah)", | ||
"Oleh Ziniak (https://github.com/oziniak)" | ||
], | ||
"license": "Apache 2.0", | ||
"bugs": { | ||
"url": "https://github.com/NYTimes/redux-taxi/issues" | ||
}, | ||
"homepage": "https://github.com/NYTimes/redux-taxi#readme", | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-core": "^6.7.4", | ||
"babel-jest": "^21.2.0", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-plugin-transform-runtime": "^6.6.0", | ||
"babel-polyfill": "^6.7.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babel-register": "^6.7.2", | ||
"chai": "^3.5.0", | ||
"jest": "^21.2.1", | ||
"prop-types": "^15.5.8", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"sinon": "^1.17.3" | ||
} | ||
"name": "redux-taxi", | ||
"version": "1.2.0", | ||
"description": "Inform server-side rendering from the component level when dealing with asynchronous actions.", | ||
"main": "lib/index", | ||
"scripts": { | ||
"compile": "rm -rf ./lib && babel -d lib/ src/", | ||
"prepublish": "npm run test && npm run compile", | ||
"test": "jest" | ||
}, | ||
"repository": "NYTimes/redux-taxi", | ||
"keywords": [ | ||
"redux", | ||
"react", | ||
"taxi", | ||
"server rendering", | ||
"ssr", | ||
"isomorphic", | ||
"universal", | ||
"nytimes" | ||
], | ||
"author": "Jeremy Gayed (https://github.com/tizmagik)", | ||
"contributors": [ | ||
"Ivan Kravchenko (https://github.com/ivankravchenko)", | ||
"Devorah Moskowitz (https://github.com/devorah)", | ||
"Oleh Ziniak (https://github.com/oziniak)" | ||
], | ||
"license": "Apache 2.0", | ||
"bugs": { | ||
"url": "https://github.com/NYTimes/redux-taxi/issues" | ||
}, | ||
"homepage": "https://github.com/NYTimes/redux-taxi#readme", | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-core": "^6.7.4", | ||
"babel-jest": "^21.2.0", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-plugin-transform-runtime": "^6.6.0", | ||
"babel-polyfill": "^6.7.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babel-register": "^6.7.2", | ||
"jest": "^21.2.1", | ||
"prop-types": "^15.5.8", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,6 @@ export default function ReduxTaxi() { | |
|
||
getAllPromises() { | ||
return promises; | ||
} | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import React, {Component, Children} from 'react'; | ||
import React, { Component, Children } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export default class ReduxTaxiProvider extends Component { | ||
static propTypes = { | ||
children: PropTypes.node.isRequired, | ||
reduxTaxi: PropTypes.object.isRequired | ||
reduxTaxi: PropTypes.object.isRequired, | ||
}; | ||
|
||
static childContextTypes = { | ||
reduxTaxi: PropTypes.object.isRequired | ||
reduxTaxi: PropTypes.object.isRequired, | ||
}; | ||
|
||
getChildContext() { | ||
return { | ||
reduxTaxi: this.props.reduxTaxi | ||
reduxTaxi: this.props.reduxTaxi, | ||
}; | ||
} | ||
|
||
render() { | ||
const {children} = this.props; | ||
const { children } = this.props; | ||
return Children.only(children); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {default as ReduxTaxi} from './ReduxTaxi'; | ||
export {default as ReduxTaxiMiddleware} from './ReduxTaxiMiddleware'; | ||
export {default as ReduxTaxiProvider} from './ReduxTaxiProvider'; | ||
export {default as registerAsyncActions} from './registerAsyncActions'; | ||
export {default as PromiseMiddleware} from './PromiseMiddleware'; | ||
export { default as ReduxTaxi } from './ReduxTaxi'; | ||
export { default as ReduxTaxiMiddleware } from './ReduxTaxiMiddleware'; | ||
export { default as ReduxTaxiProvider } from './ReduxTaxiProvider'; | ||
export { default as registerAsyncActions } from './registerAsyncActions'; | ||
export { default as PromiseMiddleware } from './PromiseMiddleware'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.