Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to babel 6 #78 #81

Merged
merged 1 commit into from
Jan 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["airbnb"]
}
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"version": "npm run build",
"clean": "rimraf build",
"lint": "eslint src/**",
"test": "mocha --compilers js:babel/register --recursive src/**/__tests__/*.js",
"test": "mocha --compilers js:babel-core/register --recursive src/**/__tests__/*.js",
"check": "npm run lint && npm run test:all",
"build": "babel src --out-dir build",
"test:watch": "mocha --compilers js:babel/register --recursive src/**/__tests__/*.js --watch",
"test:describeWithDOMOnly": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMOnly-spec.js",
"test:describeWithDOMSkip": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMSkip-spec.js",
"test:watch": "mocha --compilers js:babel-core/register --recursive src/**/__tests__/*.js --watch",
"test:describeWithDOMOnly": "mocha --compilers js:babel-core/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMOnly-spec.js",
"test:describeWithDOMSkip": "mocha --compilers js:babel-core/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMSkip-spec.js",
"test:all": "npm run react:13 && npm test && npm run test:describeWithDOMOnly && npm run test:describeWithDOMSkip && npm run react:14 && npm test && npm run test:describeWithDOMOnly && npm run test:describeWithDOMSkip",
"react:clean": "rimraf node_modules/react node_modules/react-dom node_modules/react-addons-test-utils",
"react:13": "npm run react:clean && npm i react@0.13",
Expand All @@ -25,7 +25,7 @@
"docs:build": "npm run docs:prepare && gitbook build",
"docs:watch": "npm run docs:prepare && gitbook serve",
"docs:publish": "npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git fetch https://github.com/airbnb/enzyme.git gh-pages && git checkout -b gh-pages && git add . && git commit -am 'update book' && git push https://github.com/airbnb/enzyme.git gh-pages --force",
"travis": "istanbul cover _mocha -- --compilers js:babel/register --recursive src/**/__tests__/*.js"
"travis": "babel-istanbul cover --report html _mocha -- --recursive src/**/__tests__/*.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -55,16 +55,20 @@
"underscore": "^1.8.3"
},
"devDependencies": {
"babel": "^5.8.21",
"babel-cli": "^6.3.17",
"babel-core": "^6.3.21",
"babel-eslint": "^4.1.4",
"babel-istanbul": "^0.5.9",
"babel-preset-airbnb": "^1.0.1",
"babel-register": "^6.3.13",
"chai": "^3.2.0",
"coveralls": "^2.11.4",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^3.0.2",
"eslint-plugin-react": "^3.14.0",
"gitbook-cli": "^1.0.0",
"istanbul": "^0.4.0",
"mocha": "^2.2.5",
"mocha": "^2.3.4",
"rimraf": "^2.4.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/ReactWrapperComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function createWrapperComponent(node, options = {}) {
// For full rendering, we are using this wrapper component to provide context if it is
// specified in both the options AND the child component defines `contextTypes` statically.
// In that case, we define both a `getChildContext()` function and a `childContextTypes` prop.
Object.assign(spec, {
objectAssign(spec, {
childContextTypes: node.type.contextTypes,
getChildContext() {
return this.state.context;
Expand Down
2 changes: 1 addition & 1 deletion src/react-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const {
findAllInRenderedTree,
} = TestUtils;

export default {
export {
createShallowRenderer,
renderToStaticMarkup,
renderIntoDocument,
Expand Down