-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
Deploy preview ready! Built with commit 883ffc2 |
Woah wait, how did react work before when you just only installed jsx support for babel? O_O @M-ZubairAhmed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix above requested changes.
.babelrc
Outdated
@@ -8,6 +8,8 @@ | |||
}, | |||
"test": { | |||
"presets": [ | |||
"react", | |||
"es2015", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of these because they are already present in next/babel
preset we added below
package.json
Outdated
"babel-plugin-lodash": "^3.2.11", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of all these devDependencies I think. since we have these in .babelrc
https://github.com/coderplex/coderplex/blob/f9d9478af33be8b32cfffaa6b4e246702ddc6da9/.babelrc#L9-L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah.. so the magic lies with in next.js 🤔 hm never digged into it anyways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@buoyantair yes the code for next/babel is here . Also before i have included them only in test environment, totally forgot production was using only one preset. my bad
@vinaypuppal yes i havent had chance to look into next/babel implementation. You can write they bunched those presents into one and packed it with next js.
do we need to follow folder structure |
@M-ZubairAhmed No need we change using this setting http://facebook.github.io/jest/docs/en/configuration.html#testregex-string |
package.json
Outdated
@@ -56,15 +56,21 @@ | |||
}, | |||
"devDependencies": { | |||
"babel-eslint": "^8.0.1", | |||
"babel-jest": "^21.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need babel-jest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
Test support Libraries
Polyfil library
Presets
Also added a sample test for a component