UdacityMobileWebScholarship / guess-quote

This application is a collaborative project made by the Google Udacity Mobile Web Specialist Scholars.
MIT License
22 stars 48 forks source link

Basic unit testing setup using jest #55

Closed drenther closed 6 years ago

drenther commented 6 years ago

Subject

Adding basic unit testing structure

Changes

skyshader commented 6 years ago

Let's add the test script into pre-commit hook along with our lint check. @drenther and @anantoghosh thoughts on this?

anantoghosh commented 6 years ago

@skyshader If we are already going to use Travis CI, then I don't think we need to execute all tests for every commit.

drenther commented 6 years ago

@anantoghosh That's right. But I think only the repo owner can setup Travis CI hooks. Right?

anantoghosh commented 6 years ago

Yeah, the owner needs to do it.

skyshader commented 6 years ago

Yep makes sense. But I don't think that we as moderators have access to set up CI with the repositories. That's the reason I thought it would be better if tested code will only be committed. But yeah, lets not enforce it and mention it in Contributing guide to write and run the tests before submitting the PR. Thoughts? @anantoghosh and @drenther

anantoghosh commented 6 years ago

Would it be possible to ask Akshit sir, he just needs to enable the repo in travis. Rest we can do ourselves. @skyshader Ok

drenther commented 6 years ago

Yes, @anantoghosh @skyshader. If he just enables the repo in Travis and commits the travis.yml file, we will be set to go.

anantoghosh commented 6 years ago

This PR is good to merge. package-lock.json will mess up we will have to handle that separately.