Comments (4)
So I have been doing some research into the different testing frameworks that are out there, and it seems like the two mains ones for testing React apps are Jest and Mocha.
After going through some tutorials for each, I can safely say that they both would work fine for us. There is some more setup required to get Mocha working, as well as a few additional libraries that are required such as Chai and Sinon in order to get assertions and mocks/stubs/spies that Jest comes with by default.
Also Jest comes with snapshot functionality baked in, which could be a great way to test individual React components.
I would say in general, unless we have a specific reason to need the additional customization that is required by Mocha, we would be safe to stick with Jest.
from undebate.
I have used JEST. It works well, it's well documented, and it is easy to use. The only downside that I can think of is it gets a bit tedious in certain parts.
from undebate.
Ok - so Jest it is. I like it because there is support for using it with Storybook - https://storybook.js.org/docs/testing/automated-visual-testing/
I can see that we are going to have to end up with a range of test environments, low lever unit tests for .js code, visual tests (woes it look right when its rendered), interactive tests (if video data stalls, does the stall window pop up and show something), and end to end tests (cypress).
from undebate.
@djbowers I looked through the code and couldn't find another example of something JS that didn't interact with anything else. We either have to build tests of things that use the db, or test things that render. app/components/preamble.jsx seems to be about the simplest thing that renders.
In this repo: https://github.com/EnCiv/iota I have taken the Iota model and made a separate repo out of it, so it can be included in multiple projects. In this repo there is test.js that starts up a local mongo db, and then tests it. You could jestify this repo, and I could migrate toward using it in undebate. But also, this could be the basis for how to create tests of things that use the mongodb, like the APIs in app/apis.
from undebate.
Related Issues (20)
- Hangup still hears playback
- Hangup Button HOT 3
- Investigate using Google Civic Information API HOT 1
- Iframe for address lookup then candidate conversation
- Record Landscape Video while in Portrait Mode on Smartphone
- Candidate Lookup Page
- Load balancing on heroku HOT 1
- Prev Speaker, Prev Section shouldn't be active
- "Sitting there" recording task
- Candidate video showed twice
- Self-service Portal for Election Leaders to Create Undebates for their Election HOT 6
- customer recorder invite must use specified email HOT 2
- Rerecord countdown confusion
- Retry upload if error
- undebate creator doesn't put listening in the right spot
- Feedback function in footer.
- Portrait Mode header messed up
- Bad experience when PC doesn't have GPU
- Poor experience if camera/mic blocked
- Poor experience if no camera
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undebate.