Comments (18)
Jest and Enzyme seem to be the go-to tools for React Unit Testing. Jest will help do all assertions and enzyme will help render React components in testing mode.
The link below explains the two tools and gives example code.
https://itnext.io/how-to-unit-test-in-react-72e911e2b8d
@devcshort, what are your specific goals regarding the unit testing issue?
I am new to unit testing :)
from react-hls.
This would be my first Hacktoberfest issue! I'll look into React Unit Testing if you'll assign me the issue.
from react-hls.
That would be great @aortiz24 ! 🙂
from react-hls.
@aortiz24 I'm actually new to unit testing as well. Ideally, I'd like to have automated testing of the react-hls-player component with several different scenarios. I don't want to accidentally push changes that break the entire package when deployed. At some point once CI/CD is set up, would like to have the tests run and then automatically deploy the package.
from react-hls.
@devcshort, if you create another issue for CI/CD setup and assign me to that issue. I'll help with CI/CD setup. I've found a medium article that guides through the process: https://medium.com/bettercode/how-to-build-a-modern-ci-cd-pipeline-5faa01891a5b
from react-hls.
@aortiz24 unfortunately I have someone assigned to CI/CD already :(
from react-hls.
I'm going to do some more investigating! @devcshort, What would those different scenarios be in regards to the automated testing of the react-hls-player component? It will help me in my research :)
from react-hls.
Hey @devcshort , I have confirmed from multiple sources that Jest and Enzyme are the go-to tools for React Unit Testing! Cypress is used for everything else :)
from react-hls.
Hi @aortiz24 sorry for not getting back to you sooner, was a busy day yesterday evening! Yes, I believe Jest and Enzyme would be the best and easiest to use for now. May look in to Cypress at a later point.
from react-hls.
No worries @devcshort! I did some more research and found that Jest alone can do the unit testing. This is a short & sweet 12 minute breakdown (11:07 - 23:09) of unit testing here: https://www.youtube.com/watch?v=r9HdJ8P6GQI The video is for people who are new to unit testing!
from react-hls.
Do you have a util.js? If not, I can make one with your guidance on what you would like unit tested.
Would you like me to make a util.test.js?
from react-hls.
I don't currently have one, if you'd like to make one, that'd be great :)
from react-hls.
Okay, sounds good.
Could you share with me your util.js file where you have written the functions you want unit tested.
Based on that util.js file, I can write the util.test.js file.
from react-hls.
I don't have a util.js file. I believe the only thing we need to test is the main video component to make sure it renders using commonly used props.
from react-hls.
Hey @devcshort, I've learned a lot by trying to work on this issue, but I can no longer devote the time to it. Best of luck!
from react-hls.
Anyone already is on this task? If yes, let talk about @testing-library? If not, I will try something with it
from react-hls.
@osmarpetry the last person wasn't able to continue on this, but if you'd like to give it a try then that'd be great. I'm not familiar with testing so if you have any ideas, I'm all ears
from react-hls.
Hi I found out a fix can I do a PR ??
from react-hls.
Related Issues (20)
- Player gets destroyed when interacting with components that use setState/state HOT 1
- TypeScript error - "playerRef" is required prop HOT 1
- this package is dead ? HOT 4
- react 17 support HOT 4
- Listen to video buffer data
- Use it in react native HOT 1
- Playback stalling at @59.598812 due to low buffer
- SSR error (Gatsby)
- How to start the player from a given location? HOT 1
- Multiple audio tracks not supported HOT 6
- use latest version of hls.js, and enable fetch loader? HOT 1
- Player start playing from start every time there is a state update with useSate HOT 1
- React-native app
- Stream is running in loop
- Open for contributors?
- NEW Package here: https://github.com/gumlet/react-hls-player HOT 4
- React 18 Support HOT 1
- HTTP “Content-Type” of “application/vnd.apple.mpegurl” is not supported. HOT 1
- Not able to play hls video in react-native-webview
- Seekbar is not working in IOS.
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 react-hls.