Comments (12)
That is the first thing that I noticed. A component as complex as this without tests is just asking for trouble.
from react-select.
Yep ... I am already having trouble running Jest tests with a Rect component I own which is including react-select within :(
from react-select.
I can actually understand some things not having unit tests depending on the unit test setup. I use Mocha/Chai/JSDom to unit test my code and I can't unit test any visual based stuff but this component definitely has a lot of none-visual stuff that can be unit tested.
from react-select.
You can unit-test visual based React stuff with Jest very well!
http://facebook.github.io/jest/docs/tutorial-react.html
And the visual based stuff you are referring to, are mostly called end to end tests (aka E2E). Just run a standalone selenium server in a gulp task, then run a middleware server and at last have a Jasmine test runner. It works well for my other projects.
All I am saying here is that having no tests is not good. I do not like the idea to ship code without enough test coverage, especially for enterprise apps we are developing here.
from react-select.
I would really appreciate help implementing tests for this component.
I have a set of manual processes that I run through to test the component before every release (based on the example configurations), it would certainly take less work to merge PRs and manage releases if our tests were automated.
@binarykitchen you mention having this setup in place for other projects - can you help get them set up here as well?
Also @ryanzec is correct, there are several things that are non-visual and could easily be unit tested.
from react-select.
@JedWatson Use the gulp-jest plugin for unit tests. Works like a charm.
from react-select.
@binarykitchen I probably wasn't clear - I'm managing a heap of open source projects at the moment between React stuff, KeystoneJS and TouchstoneJS as well as a having a full time job.
If someone else is able to contribute unit tests for this component I would really appreciate it, otherwise I'll get to them when I can :)
from react-select.
fair enough - it is just the fact that code without test is never good. always enforce yourself never to ship code without test ;)
from react-select.
I've added Jest framework into react-select. Pending PR. #107
from react-select.
Basic tests are in - more to come.
from react-select.
good, way to go
from react-select.
Always could use improvement. This issue isn't really quantifiable beyond a test count being > 1, so I'm closing.
@JedWatson if a given coverage requirement is wanted, lets set that up as a new issue.
from react-select.
Related Issues (20)
- Name property is not defined for option in the animation color dropdown.
- autoComplete overlaps the input field on v5 HOT 1
- <title> OMG HOT 1
- react-select v5.8.0: `Extra attributes from the server: aria-activedescendant` HOT 3
- Async multi select options are reset after selecting an option HOT 2
- Issue with input type="number" on Firefox/Safari HOT 2
- Menu is closing inside tests HOT 4
- Validation works incorrectly for React-select with Formik and yup on mobile device
- JAWS screen reader highlight/focus issue
- Bug: right clicking on a select input when the menu is open makes the input unresponsive
- Inconsistent Behavior With Magnification When Selecting Dropdowns
- Inconsistent Behavior With Magnification When Selecting Dropdowns
- Pressing on Tab key takes me to outside of the form instead of next input. HOT 9
- <withAsyncPaginate: the options menu closes on every option click>
- The issue where the keyboard's down button does not work immediately during Korean input
- Extra Space in Dropdown Menu of React Select Component on Initial Render
- not showing the inital value HOT 1
- Unwanted focus state on the input element HOT 1
- onMenuScrollToBottom and onMenuScrollToTop does not works in mobile view for Select in React
- OptionType doesn't describe what it accepts
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-select.