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

Unit tests #144

Closed
mike-robertson opened this issue Sep 20, 2016 · 19 comments
Closed

Unit tests #144

mike-robertson opened this issue Sep 20, 2016 · 19 comments
Milestone

Comments

@mike-robertson
Copy link
Member

We need to add unit tests since the code base is becoming quite large, and since we all have our own 'domains' that we work on, changes to components across domains can cause subtle bugs (if we don't have unit tests). I think that the #1 priority after completing MVP should be to go back and add useful unit tests for everything since we don't have any dedicated QA contributors or QA process.

@Roshanjossey
Copy link
Contributor

@mike-robertson: I'd love to work on this. I'm very much aligned to TDD and unit testing. Do you have a testing framework in mind? I've used mocha, chai and enzyme to test components. I also had a really bad time trying to use Jest.

@howardchung
Copy link
Member

odota/core uses mocha. I think it'd be helpful to use the same one on both.

@mike-robertson
Copy link
Member Author

I agree that mocha/chai/enzyme is the easiest testing 'stack' to use with react.

@dartharaknus
Copy link
Member

We also need e2e testing, http://nightwatchjs.org/

@howardchung
Copy link
Member

https://www.browserstack.com/ is another option. I've never tried setting this kind of thing up, so feel free to tackle this if you have any experience.

@Roshanjossey
Copy link
Contributor

@howardchung: As far as I understand, browserstack is a paid service, do we have enough bandwidth to use it?
@dartharaknus: nightwatchjs looks pretty cool. Have you used it? Looking forward to work with it

@howardchung
Copy link
Member

They are free for open source projects (need to submit a request):
https://www.browserstack.com/pricing

@howardchung howardchung modified the milestones: Backlog, 2017-3 Nov 22, 2016
@howardchung howardchung modified the milestones: Backlog, 2017-3 Feb 11, 2017
@howardchung
Copy link
Member

@Roshanjossey are you still interested in improving test coverage? @mike-robertson laid out the foundation and wrote a couple of quick tests, but the majority of components still don't have them.

@masad-frost
Copy link
Contributor

https://facebook.github.io/jest/ is worth considering

@Roshanjossey
Copy link
Contributor

@howardchung, @mike-robertson, I'm sorry I couldn't take a look at this earlier. I'll get started on this.

How should I divide work? I'd like to submit PRs in smaller chunks rather than doing it all at once

@howardchung
Copy link
Member

Maybe just add one test for one component at a time.

@masad-frost
Copy link
Contributor

I wrote on discord, but might be better to say it here. We should probably be using selenium as our web driver now that browserstack is looking to support us https://www.browserstack.com/automate

@Tb0
Copy link

Tb0 commented Mar 24, 2017

Hello everyone,
I am a QA engineer Dota2 fan, and I would be happy to help you on automating End to End tests using the selenium webdriver in JS. That would be the easiest way to integrate E2E tests to the current stack of technology. Ping me if you are interested in :) @howardchung

@howardchung
Copy link
Member

@Tb0 would love to see E2E tests added! @masad-frost set up an account for us on BrowserStack, let me know if you need access to that.

Also apparently Chrome 59 has a headless mode which is supposed to make CI testing easier.

@howardchung
Copy link
Member

Now that the project is a standard create-react-app project you can use their testing convention, based on Jest:

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests

@howardchung
Copy link
Member

@dartharaknus suggests https://www.chromaticqa.com/ for component testing

@Luchanso
Copy link
Contributor

Luchanso commented Aug 6, 2018

I suggest use puppeteer, but it's not unit-test its E2E test. You can compare screenshots like in Codesandbox

@howardchung
Copy link
Member

I think that's more #1596

@howardchung
Copy link
Member

We have a few e2e tests. . . not sure we'll get more than that but happy to accept contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants