sourcecred/src
Dandelion Mané feef119250
Add and implement `Graph.equals` (#369)
It turns out we forgot to add this to the API, so I added it. I also
implemented it. The tests are pretty thorough; as an added innovation
over our previous tests (e.g. in #312 and #61), we now consistently test
that equality is commutative.

In contrast to our previous implementations, this one is massively
simpler. That's an upside of using primitive ES6 data structures to
store all of the graph's information... which is itself an upside of not
trying to store arbitrary additional information in the graph. Now we
can just do a deep equality check on the underlying nodes set and edges
map!

We might be able to performance tune this method by taking advantage of
the structure of our nodes and edges. This should suffice for now,
though.

Paired with @wchargin

Test plan:
Unit tests were added. Run `yarn travis`
2018-06-08 14:17:57 -07:00
..
tools Log error contents on promise rejection (#345) 2018-06-05 11:15:13 -07:00
v1 Tune GitHub graphql page limit (#349) 2018-06-05 16:51:22 -07:00
v2/core Fork project to v1/ and v2/ in preparation for v3 (#327) 2018-06-01 17:17:44 -07:00
v3/core Add and implement `Graph.equals` (#369) 2018-06-08 14:17:57 -07:00