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)
- worst thing ever see in my life HOT 2
- Types broken in `React@19` & `Next@15` HOT 4
- CreatableSelect missing all classes HOT 1
- Page crashed in Edge browser with translation
- Clicking outside of the menu does not close a controlled menu
- Unable to select color using voice access commands.
- Async Select Multi: Options Cleared After Selection Despite Persistent Search Term
- how to get the value from select component in a form based on id
- Tooltip not working
- AsyncCreatableSelect not allowing to enter more than character to search or create
- defaultValue text gets truncated with elipsis (...) at the end HOT 1
- how to avoid this select expand while selecting multiple options
- Unexpected behaviour in combination with `react-hook-form` HOT 1
- Select not scrolling to Selected Item when menuPortalTarget={document.body}
- Incorrect user of <label for=FORM_ELEMENT>
- Pressing enter on a button in a custom option component consumes the event before it reaches the custom button. HOT 1
- Tabindex not working HOT 2
- The dropdown does not open in createable select when the search input and the options label do not match
- Clicking on an item using Custom Menu scrolls to top
- Styles not Loading in Remix HOT 4
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.