Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Testing libraries/frameworks? #76

Closed
cmenedes opened this issue Oct 17, 2019 · 17 comments
Closed

Testing libraries/frameworks? #76

cmenedes opened this issue Oct 17, 2019 · 17 comments
Labels
Discussion Ideas, feature requests, views on features. Anything which is a discussion.

Comments

@cmenedes
Copy link

Hi, I think this project would benefit from a test-driven workflow, so i'm opening this issue for others to openly discuss any specific libraries/frameworks they would recommend to test code for this project.

Personally, I use Jest to unit test my Javascript (which is mainly JQuery) code at work. I know Jest or Jasmine aren't specific to a Javascript library whereas Enzyme is meant to be used with React. Both can be used together as well.

I would appreciate someone with more experience writing tests with React to chime in on this as my experience is limited! (going based off the assumption we will be using React on the front-end)

Some resources i've looked into:

@allella allella mentioned this issue Oct 17, 2019
@craigjbass
Copy link

I teach teams how to build systems using (A)TDD, including systems in react.

It’s not easy for individuals to change their fundamental approach to software dev, especially a large open source community.

I think if we have a number of people here familiar & productive with GOOS-style ATDD, and willing to spend significant effort providing pairing it could work. Struggle to see it otherwise

I would definitely recommend getting a test runner setup tho, if not I will definitely be spending some time getting this in place

@cmenedes
Copy link
Author

@craigjbass 👍

It’s not easy for individuals to change their fundamental approach to software dev, especially a large open source community.

I would imagine so. I haven't been writing tests for too long and i'm still getting used to TDD, but I've found it very helpful so far. I haven't been a maintainer on an open source project with more than two members, so I'm just going based off my current experience. But yeah, I suppose that would belong in a higher-level conversation with some more input.

I would definitely recommend getting a test runner setup tho, if not I will definitely be spending some time getting this in place

Would Jest be considered a test runner in this scenario? I'm a little unfamiliar with terminology. Either way, I would be interested in helping set that up.

@craigjbass
Copy link

Would Jest be considered a test runner in this scenario? I'm a little unfamiliar with terminology. Either way, I would be interested in helping set that up.

Yes. Jest comes with create-react-app which is a fairly sensible starting point for most teams.

@PrestonElliott
Copy link
Contributor

PrestonElliott commented Oct 17, 2019

What do you guys think about cypress.io? I found some great resources on their website to implement E2E testing on React apps.

@chrismgonzalez
Copy link
Contributor

I've seen great success with Jest and React-Testing-Library. I'm all for using those tools.

@wuilliam321
Copy link

wuilliam321 commented Oct 17, 2019

My vote vor jest + React-Testing-Library + Cypress

Edited: It's ok by doing TDD. but keep the focus on the MVP, and clever tests

@attaradev
Copy link

I think Jest will be a great choice

@latchkostov
Copy link

Jest > Jasmine, my opinion. I think for MVP, there should be more time spent on holistic tests, perhaps E2E tests, instead of individual unit tests. Agree with @wuilliam321 that any testing we do should be smart for MVP, then we can fill that gaps later.

@francocorreasosa
Copy link
Member

It seems it will be Jest + React testing library to start with.

@MirzaChilman
Copy link
Contributor

IMHO for MVP I think adding cypress is kinda bit overkill right now, I would suggest we go for Jest + RTL first

@Wizyma
Copy link

Wizyma commented Oct 18, 2019

testing-library
huge community and support + cover almost everything

@cmenedes
Copy link
Author

What I've gathered is that folks are fond of Jest + React-Testing library. Sticking to a defined test-driven workflow might not be applicable for an MVP; clever and holistic tests seem to be a good start. @QuincyLarson , should getting a test runner set up with some basic testing be part of the MVP?

@chrismgonzalez
Copy link
Contributor

@cmenedes I think it's very important to get some basic tests going so we can be confident that the App does what we expect to do before initial release. You have my thumbs up for getting some tests going, however, perhaps it would be wise to wait until we have the basic app in the repo. I imagine this will be over the weekend or early next week, as we have an open PR right now that is receiving final tweaks.

Thanks for your thoughts!

@mquadrant
Copy link

I think Jest + React testing library would really be cool for this project especially MVP. Maybe later cypress can be added for end to end testing.

@jorgearuv
Copy link

I agree with Jest + React Testing Library 👍

@vardhanapoorv
Copy link

I think Jest will a good way to start.

@vkWeb vkWeb added the Discussion Ideas, feature requests, views on features. Anything which is a discussion. label Oct 24, 2019
@kognise kognise mentioned this issue Oct 25, 2019
7 tasks
@QuincyLarson
Copy link
Contributor

Thanks for your input everyone.

There seems to be a consensus that we should use Jest + React. I'm going to consider this resolved and close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Discussion Ideas, feature requests, views on features. Anything which is a discussion.
Projects
None yet
Development

No branches or pull requests