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

Tests framework added #98

Merged
merged 9 commits into from Nov 10, 2017
Merged

Tests framework added #98

merged 9 commits into from Nov 10, 2017

Conversation

@M-ZubairAhmed
Copy link
Collaborator

M-ZubairAhmed commented Nov 9, 2017

Test support Libraries

  • babel-jest
  • enzyme
  • enzyme-adapter-react-16
  • enzyme-to-json
  • react-test-renderer

Polyfil library

  • raf

Presets

  • babel-preset-es2015
  • babel-preset-react

Also added a sample test for a component

@M-ZubairAhmed M-ZubairAhmed requested a review from vinaypuppal Nov 9, 2017
@coderplex-bot
Copy link
Collaborator

coderplex-bot commented Nov 9, 2017

Deploy preview ready!

Built with commit 883ffc2

https://deploy-preview-98--coderplex.netlify.com

@buoyantair
Copy link
Collaborator

buoyantair commented Nov 9, 2017

Woah wait, how did react work before when you just only installed jsx support for babel? O_O @M-ZubairAhmed

Copy link
Member

vinaypuppal left a comment

Can you fix above requested changes.

.babelrc Outdated
@@ -8,6 +8,8 @@
},
"test": {
"presets": [
"react",
"es2015",

This comment has been minimized.

@vinaypuppal

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.

@vinaypuppal

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.

@buoyantair

buoyantair Nov 9, 2017

Collaborator

Ah.. so the magic lies with in next.js 🤔 hm never digged into it anyways

This comment has been minimized.

This comment has been minimized.

@M-ZubairAhmed

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.

M-ZubairAhmed
@M-ZubairAhmed
Copy link
Collaborator Author

M-ZubairAhmed commented Nov 9, 2017

do we need to follow folder structure __tests__ ?

Zubair Ahmed
@vinaypuppal
Copy link
Member

vinaypuppal commented Nov 9, 2017

@@ -56,15 +56,21 @@
},
"devDependencies": {
"babel-eslint": "^8.0.1",
"babel-jest": "^21.2.0",

This comment has been minimized.

@vinaypuppal

vinaypuppal Nov 9, 2017

Member

Do we need babel-jest ?

This comment has been minimized.

@M-ZubairAhmed

M-ZubairAhmed Nov 10, 2017

Author Collaborator

changed!

Zubair Ahmed added 3 commits Nov 10, 2017
Zubair Ahmed
@vinaypuppal vinaypuppal merged commit b1572d0 into master Nov 10, 2017
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@vinaypuppal vinaypuppal deleted the tests branch Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.