feac85ad2c
Summary: This is our first dynamic test of a React component! Enzyme looks pretty easy to use to me, for both snapshot tests and interaction simulation. In doing so, we catch a minor bug in the edge case where a contribution is not owned by any plugin (`colSpan`, not `colspan`). This edge case does not appear in the sample data, but it does appear in the test data, even prior to this commit. The previous renderer, `react-test-renderer`, appears not to surface this error. Furthermore, this bug did not cause any user-visible errors except a `console.error`. Test Plan: Inspect the snapshot file to make sure that it is reasonable. (The existing test case has its snapshot regenerated due to formatting differences between the two renderers.) To test that the browser error is fixed, render a contribution list on a GitHub graph but with an empty adapter set. One way to do this is to comment out line 7 of `standardAdapterSet.js`; alternately, you can use the React Dev Tools to select the `ContributionList` node, then run ```js $r.props.adapters.adapters = {}; $r.forceUpdate(); ``` Note subsequently that there is no console error and that the `<td>`s in question span three columns. wchargin-branch: contributionlist-dynamic-test |
||
---|---|---|
config | ||
experiments | ||
flow-typed/npm | ||
scripts | ||
src | ||
.flowconfig | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
package.json | ||
yarn.lock |
README.md
SourceCred
The open-source community provides an enormous amount of value to the world. However, open-source contributors go largely unrewarded and unrecognized. SourceCred aims to help that situation, by building tools that enable quantitatively measuring the value that open-source contributors provide to individual projects, and to the community as a whole.
SourceCred will create a "Cred Graph", which is a graph that shows how the contributions that compose open-source projects are related to and derive value from each other. From this, we'll be able to assign "cred" to users based on how valuable their contributions are. Cred will be assigned based on a mixture of objective data (e.g. references between GitHub pull requests) and subjective feedback (e.g. projects' own judgments on how important different contributions were).
If you'd like to contribute, please follow along with our issues, as we are using issues to coordinate development and design decisions. We also have a slack.