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

Setup template project's tests to actually test something #14

Closed
anp opened this issue Jan 16, 2017 · 2 comments
Closed

Setup template project's tests to actually test something #14

anp opened this issue Jan 16, 2017 · 2 comments

Comments

@anp
Copy link
Contributor

anp commented Jan 16, 2017

It might be good to improve tests in the template project so that they actually serve as an example to a new user how to test their app/components/etc. Right now there's just a no-op test.

@Kureev
Copy link
Contributor

Kureev commented Jan 27, 2017

What kind of tests do you want? Which parts of the codebase requires tests first? Which technology stack for testing you have in mind?

@anp
Copy link
Contributor Author

anp commented Jan 27, 2017

The template project is currently set up to use jest, and there's an example test (see https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/__tests__/mainTest.js). However, this doesn't test anything other than 1 == 1.

This isn't incredibly high priority, but I think it would be excellent to use the template project to set user expectations about what a good test-first strategy looks like. Perhaps a small component test or something else. Open to ideas here.

Also note that the template project currently doesn't test properly when yarn is installed, because yarn doesn't (yet) hoist executables of transitive dependencies into the node_modules/.bin directory of the project. This should be fixed whenever yarnpkg/yarn#760 is resolved.

@anp anp closed this as completed Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants