Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTests framework added #98
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 |
|
Can you fix above requested changes. |
| @@ -8,6 +8,8 @@ | |||
| }, | |||
| "test": { | |||
| "presets": [ | |||
| "react", | |||
| "es2015", | |||
This comment has been minimized.
This comment has been minimized.
vinaypuppal
Nov 9, 2017
Member
No need of these because they are already present in next/babel preset we added below
| "babel-plugin-lodash": "^3.2.11", | ||
| "babel-preset-es2015": "^6.24.1", | ||
| "babel-preset-react": "^6.24.1", |
This comment has been minimized.
This comment has been minimized.
vinaypuppal
Nov 9, 2017
Member
No need of all these devDependencies I think. since we have these in .babelrc
https://github.com/coderplex/coderplex/blob/f9d9478af33be8b32cfffaa6b4e246702ddc6da9/.babelrc#L9-L14
This comment has been minimized.
This comment has been minimized.
buoyantair
Nov 9, 2017
Collaborator
Ah.. so the magic lies with in next.js
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
M-ZubairAhmed
Nov 9, 2017
•
Author
Collaborator
@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 |
| @@ -56,15 +56,21 @@ | |||
| }, | |||
| "devDependencies": { | |||
| "babel-eslint": "^8.0.1", | |||
| "babel-jest": "^21.2.0", | |||
M-ZubairAhmed commentedNov 9, 2017
Test support Libraries
Polyfil library
Presets
Also added a sample test for a component