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

OWA-13 added testing setup and basic test example for React OWA and Redux #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamGrzybkowski
Copy link
Contributor

No description provided.

@@ -0,0 +1,20 @@
require('babel-register')();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please put in some docs here? What does it do? And start from the openmrs license...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is just setup for jsdom to create realistic browser environment for testing.

"enzyme": "^2.7.0",
"jsdom": "^9.9.1",
"react-addons-test-utils": "^15.4.2",
"mocha": "^3.2.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reasons you didn't use Jest as the react team? It's mentioned at https://facebook.github.io/react/docs/test-utils.html ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mocha combined with Enzyme seems to be more popular in the react community. You can check out nice comparison here http:https://instea.sk/2016/08/testing-react-applications-with-karma-jest-or-mocha/

In overall after spending my first day with React it just seemed to be better option

@AdamGrzybkowski AdamGrzybkowski changed the title OWA-13 added testing setup and basic test example for React OWA OWA-13 added testing setup and basic test example for React OWA and Redux Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants